Bug 1524564

Summary: python-pip: Failed "python3 -m ensurepip"
Product: [Fedora] Fedora Reporter: Jun Aruga <jaruga>
Component: python-pipAssignee: Tomas Orsava <torsava>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: bkabrda, cstratak, metherid, ncoghlan, python-sig, tflink, TicoTimo, torsava
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-11 17:01:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jun Aruga 2017-12-11 16:56:45 UTC
Description of problem:

"python3 -m ensurepip" failed.

I know that the reason is `/usr/lib/python3.6/site-packages/pip/_vendor/ipaddress.py` is removed at once. Than the fixed version is added again by the commit "Reintroduce the ipaddress module in the python3 subpackage.".

But as it looks not available yet. and not affected to the docker image, I would  like to report this for people that faced this issue.

Below is on Fedora 27.
But it can be happened on f26 and rawhide too.

Version-Release number of selected component (if applicable):
python3-pip-9.0.1-13.fc28 (maybe)
python3-pip-9.0.1-13.fc27
python3-pip-9.0.1-10.fc26 (maybe)

How reproducible:


Steps to Reproduce:

```
$ rpm -qf /usr/bin/python3
python3-3.6.3-2.fc27.x86_64

$ rpm -q python3-pip
python3-pip-9.0.1-13.fc27.noarch

$ /usr/bin/python3 -m ensurepip
Traceback (most recent call last):
  File "/usr/lib64/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/lib64/python3.6/ensurepip/__main__.py", line 4, in <module>
    ensurepip._main()
  File "/usr/lib64/python3.6/ensurepip/__init__.py", line 212, in _main
    default_pip=args.default_pip,
  File "/usr/lib64/python3.6/ensurepip/__init__.py", line 91, in bootstrap
    new_whl = rewheel.rewheel_from_record(dr, rewheel_dir.name)
  File "/usr/lib64/python3.6/ensurepip/rewheel/__init__.py", line 75, in rewheel_from_record
    new_wheel.write(os.path.join(site_dir, f), arcname=f)
  File "/usr/lib64/python3.6/zipfile.py", line 1594, in write
    zinfo = ZipInfo.from_file(filename, arcname)
  File "/usr/lib64/python3.6/zipfile.py", line 484, in from_file
    st = os.stat(filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/python3.6/site-packages/pip/_vendor/ipaddress.py'
```

Actual results:
The command is failed with error.

Expected results:
The command is finished with success.

Additional info:

Comment 1 Jun Aruga 2017-12-11 16:58:33 UTC
Additional info:
https://github.com/junaruga/rpm-py-installer/issues/101

Comment 2 Charalampos Stratakis 2017-12-11 17:01:16 UTC
Duplicate of bug #1522684

The issue is fixed with [0] and [1] which are on their way to the stable repos.

[0] https://bodhi.fedoraproject.org/updates/FEDORA-2017-5932c4f594
[1] https://bodhi.fedoraproject.org/updates/FEDORA-2017-eac4d90de1

*** This bug has been marked as a duplicate of bug 1522684 ***

Comment 3 Jun Aruga 2017-12-11 18:32:02 UTC
Sorry for my duplicated BZ ticket.
Thanks for the information.