Red Hat Bugzilla – Bug 1283658
python ensurepip fails to upgrade pip (py27)
Last modified: 2016-09-05 11:01:48 EDT
Description of problem:
sudo python -m ensurepip --upgrade
Traceback (most recent call last):
File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/lib64/python2.7/ensurepip/__main__.py", line 4, in <module>
File "/usr/lib64/python2.7/ensurepip/__init__.py", line 248, in _main
File "/usr/lib64/python2.7/ensurepip/__init__.py", line 102, in bootstrap
dep_records = rewheel.find_system_records([p for p in _PROJECTS])
File "/usr/lib64/python2.7/ensurepip/rewheel/__init__.py", line 39, in find_system_records
sys_sitepack = site.getsitepackages([sys.base_prefix, sys.base_exec_prefix])
AttributeError: 'module' object has no attribute 'base_prefix'
Version-Release number of selected component (if applicable):
According to https://docs.python.org/2/library/ensurepip.html
this command supposed to work.
sys.base_prefix is py3 only .
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
This should be fixed now in rawhide as the rewheel module patch was not applied fully for python2. By trying your reproducer everything seemed to work fine now with no traceback, thus marking it as duplicate of another bug that dueled on the same issue.
*** This bug has been marked as a duplicate of bug 1372183 ***