Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1283658 - python ensurepip fails to upgrade pip (py27)
Summary: python ensurepip fails to upgrade pip (py27)
Keywords:
Status: CLOSED DUPLICATE of bug 1372183
Alias: None
Product: Fedora
Classification: Fedora
Component: python
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Charalampos Stratakis
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-19 14:18 UTC by Attila Fazekas
Modified: 2016-09-05 15:01 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-05 15:01:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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 ***


Note You need to log in before you can comment on or make changes to this bug.