New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python -m ensurepip fails #2

Open
rkuska opened this Issue Mar 5, 2015 · 2 comments

Comments

Projects
None yet
1 participant
@rkuska
Member

rkuska commented Mar 5, 2015

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'

Neither sys.base_prefix nor sys.base_exec_prefix are present in python 2.7.

@rkuska

This comment has been minimized.

Show comment
Hide comment
@rkuska

rkuska Mar 5, 2015

Member
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 42, in find_system_records
    sys_sitepack = site.getsitepackages([sys.prefix, sys.exec_prefix])
TypeError: getsitepackages() takes no arguments (1 given)

This one should cause problems also in python3:

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 129, in bootstrap
    shutil.copy(whl, tmpdir)
  File "/usr/lib64/python2.7/shutil.py", line 119, in copy
    copyfile(src, dst)
  File "/usr/lib64/python2.7/shutil.py", line 82, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: '/usr/lib64/python2.7/ensurepip/_bundled/setuptools-7.0-py2.py3-none-any.whl'
Member

rkuska commented Mar 5, 2015

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 42, in find_system_records
    sys_sitepack = site.getsitepackages([sys.prefix, sys.exec_prefix])
TypeError: getsitepackages() takes no arguments (1 given)

This one should cause problems also in python3:

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 129, in bootstrap
    shutil.copy(whl, tmpdir)
  File "/usr/lib64/python2.7/shutil.py", line 119, in copy
    copyfile(src, dst)
  File "/usr/lib64/python2.7/shutil.py", line 82, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: '/usr/lib64/python2.7/ensurepip/_bundled/setuptools-7.0-py2.py3-none-any.whl'
@rkuska

This comment has been minimized.

Show comment
Hide comment
@rkuska

rkuska Mar 17, 2015

Member

More or less fixed by 6162cda but I still keep this open because of pypa/virtualenv#732

Member

rkuska commented Mar 17, 2015

More or less fixed by 6162cda but I still keep this open because of pypa/virtualenv#732

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment