Red Hat Bugzilla – Bug 1319963
python34's ensurepip is broken
Last modified: 2017-05-29 13:17:45 EDT
This should work, but it doesn't:
# python3 -m ensurepip
Traceback (most recent call last):
File "/usr/lib64/python3.4/runpy.py", line 170, in _run_module_as_main
File "/usr/lib64/python3.4/runpy.py", line 85, in _run_code
File "/usr/lib64/python3.4/ensurepip/__main__.py", line 4, in <module>
File "/usr/lib64/python3.4/ensurepip/__init__.py", line 209, in _main
File "/usr/lib64/python3.4/ensurepip/__init__.py", line 98, in bootstrap
File "/usr/lib64/python3.4/pkgutil.py", line 629, in get_data
File "<frozen importlib._bootstrap>", line 1623, in get_data
FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib64/python3.4/ensurepip/_bundled/setuptools-12.0.5-py2.py3-none-any.whl'
I suspect that some files are missing from the python34 package.
This may be the root cause of bug 1263057.
(In reply to Andy Lutomirski from comment #0)
> I suspect that some files are missing from the python34 package.
This does indeed appear to be the case. As per Stack Overflow, the setuptools and pip wheels are missing from /lib64/python3.4/ensurepip.
Ah, minor correction: they're missing from /lib64/python3.4/ensurepip/__bundled__.
One final correction because apparently I cannot read: the actual directory is _bundled, not __bundled__.
If I understood Fedora's python3 package (the one in F25, Python 3.5) correctly F25 solves this with the "rewheel" patch. That patch is not provided by python34.
However even enabling rewheel support alone is likely not fixing this because pip and setuptools are not using wheels in EPEL7. However we have python-wheel in EPEL7 now and providing a python34-wheel should be simple I guess.
Anyway it looks to me as if there is no simple fix so I'd value the opinion of a maintainer here. Clearly the current package does not work in some cases which I think are quite important (mainly "creating a virtualenv").
The fix for this can be found in bug 1263057#c10. Should this be closed as a duplicate or marked as blocking the other bug?
Personally I think this bug has the better (initial) description but the comments in bug 1263057 contains more info.
Closing it as a duplicate, a fix has been pushed.
*** This bug has been marked as a duplicate of bug 1263057 ***