Bug 1283658

Summary: python ensurepip fails to upgrade pip (py27)
Product: [Fedora] Fedora Reporter: Attila Fazekas <afazekas>
Component: pythonAssignee: Charalampos Stratakis <cstratak>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: bkabrda, dmalcolm, ivazqueznet, jayvdb, jberan, jonathansteffan, ncoghlan, pviktori, tomspur
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-05 15:01:48 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 Attila Fazekas 2015-11-19 14:18:28 UTC
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>
    ensurepip._main()
  File "/usr/lib64/python2.7/ensurepip/__init__.py", line 248, in _main
    default_pip=args.default_pip,
  File "/usr/lib64/python2.7/ensurepip/__init__.py", line 102, in bootstrap
    dep_records = rewheel.find_system_records([p[0] 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):
python-libs-2.7.10-8.fc23.x86_64

How reproducible:
always

According to https://docs.python.org/2/library/ensurepip.html
this command supposed to work.

sys.base_prefix is py3 only .

Comment 1 Fedora Admin XMLRPC Client 2016-01-29 13:05:32 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 2 Charalampos Stratakis 2016-09-05 15:01:48 UTC
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 ***