Skip to content
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

pip3 install 3.6.3 crashes on startup; 3.5.4 works; on OS X 10.13.1 #76225

Closed
DanPlatt mannequin opened this issue Nov 16, 2017 · 5 comments
Closed

pip3 install 3.6.3 crashes on startup; 3.5.4 works; on OS X 10.13.1 #76225

DanPlatt mannequin opened this issue Nov 16, 2017 · 5 comments
Labels
topic-installation type-bug An unexpected behavior, bug, or error

Comments

@DanPlatt
Copy link
Mannequin

DanPlatt mannequin commented Nov 16, 2017

BPO 32044
Nosy @berkerpeksag

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2017-11-16.09:19:20.834>
created_at = <Date 2017-11-16.05:01:02.952>
labels = ['type-bug', 'expert-installation']
title = 'pip3 install 3.6.3 crashes on startup; 3.5.4 works; on OS X 10.13.1'
updated_at = <Date 2017-11-16.09:19:20.828>
user = 'https://bugs.python.org/DanPlatt'

bugs.python.org fields:

activity = <Date 2017-11-16.09:19:20.828>
actor = 'berker.peksag'
assignee = 'none'
closed = True
closed_date = <Date 2017-11-16.09:19:20.834>
closer = 'berker.peksag'
components = ['Installation']
creation = <Date 2017-11-16.05:01:02.952>
creator = 'DanPlatt'
dependencies = []
files = []
hgrepos = []
issue_num = 32044
keywords = []
message_count = 5.0
messages = ['306336', '306337', '306339', '306340', '306347']
nosy_count = 2.0
nosy_names = ['berker.peksag', 'DanPlatt']
pr_nums = []
priority = 'normal'
resolution = 'third party'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue32044'
versions = ['Python 3.6']

@DanPlatt
Copy link
Mannequin Author

DanPlatt mannequin commented Nov 16, 2017

pip3 installed with 3.6.3 crashes on startup.
pip3 installed with 3.5.4 works.
Appears on OS X 10.13.1

@DanPlatt DanPlatt mannequin added type-crash A hard crash of the interpreter, possibly with a core dump topic-installation labels Nov 16, 2017
@DanPlatt
Copy link
Mannequin Author

DanPlatt mannequin commented Nov 16, 2017

platt@MacBook-Pro.local:/Users/platt $ pip3
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/bin/pip3", line 7, in <module>
    from pip import main
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/__init__.py", line 26, in <module>
    from pip.utils import get_installed_distributions, get_prog
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/utils/__init__.py", line 27, in <module>
    from pip._vendor import pkg_resources
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3018, in <module>
    @_call_aside
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3004, in _call_aside
    f(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3046, in _initialize_master_working_set
    dist.activate(replace=False)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2578, in activate
    declare_namespace(pkg)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2152, in declare_namespace
    _handle_ns(packageName, path_item)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2092, in _handle_ns
    _rebuild_mod_path(path, packageName, module)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2121, in _rebuild_mod_path
    orig_path.sort(key=position_in_sys_path)
AttributeError: '_NamespacePath' object has no attribute 'sort'

@berkerpeksag
Copy link
Member

Thank you for your report. This is a problem with setuptools: pypa/setuptools#885 I suggest upgrading both setuptools and pip:

    $ pip install -U setuptools pip

@berkerpeksag berkerpeksag added type-bug An unexpected behavior, bug, or error and removed type-crash A hard crash of the interpreter, possibly with a core dump labels Nov 16, 2017
@DanPlatt
Copy link
Mannequin Author

DanPlatt mannequin commented Nov 16, 2017

platt@MacBook-Pro.local:/Users/platt $ pip install -U setuptools pip
Collecting setuptools
  Downloading setuptools-36.7.2-py2.py3-none-any.whl (482kB)
    100% |████████████████████████████████| 491kB 2.6MB/s 
Requirement already up-to-date: pip in ./Library/Python/2.7/lib/python/site-packages
Installing collected packages: setuptools
  Found existing installation: setuptools 18.5
    Uninstalling setuptools-18.5:
Exception:
Traceback (most recent call last):
  File "/Users/platt/Library/Python/2.7/lib/python/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/Users/platt/Library/Python/2.7/lib/python/site-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/Users/platt/Library/Python/2.7/lib/python/site-packages/pip/req/req_set.py", line 778, in install
    requirement.uninstall(auto_confirm=True)
  File "/Users/platt/Library/Python/2.7/lib/python/site-packages/pip/req/req_install.py", line 754, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/Users/platt/Library/Python/2.7/lib/python/site-packages/pip/req/req_uninstall.py", line 115, in remove
    renames(path, new_path)
  File "/Users/platt/Library/Python/2.7/lib/python/site-packages/pip/utils/__init__.py", line 267, in renames
    shutil.move(old, new)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 299, in move
    copytree(src, real_dst, symlinks=True)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 208, in copytree
    raise Error, errors
Error: [('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc', '/var/folders/68/lk7bsfq51hq3406jk8v83z880000gn/T/pip-hvP8_p-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc', "[Errno 1] Operation not permitted: '/var/folders/68/lk7bsfq51hq3406jk8v83z880000gn/T/pip-hvP8_p-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.py', '/var/folders/68/lk7bsfq51hq3406jk8v83z880000gn/T/pip-hvP8_p-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.py', "[Errno 1] Operation not permitted: '/var/folders/68/lk7bsfq51hq3406jk8v83z880000gn/T/pip-hvP8_p-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py', '/var/folders/68/lk7bsfq51hq3406jk8v83z880000gn/T/pip-hvP8_p-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py', "[Errno 1] Operation not permitted: '/var/folders/68/lk7bsfq51hq3406jk8v83z880000gn/T/pip-hvP8_p-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.pyc', '/var/folders/68/lk7bsfq51hq3406jk8v83z880000gn/T/pip-hvP8_p-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.pyc', "[Errno 1] Operation not permitted: '/var/folders/68/lk7bsfq51hq3406jk8v83z880000gn/T/pip-hvP8_p-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib', '/var/folders/68/lk7bsfq51hq3406jk8v83z880000gn/T/pip-hvP8_p-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib', "[Errno 1] Operation not permitted: '/var/folders/68/lk7bsfq51hq3406jk8v83z880000gn/T/pip-hvP8_p-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib'")]

@DanPlatt DanPlatt mannequin reopened this Nov 16, 2017
@DanPlatt DanPlatt mannequin added type-crash A hard crash of the interpreter, possibly with a core dump and removed type-bug An unexpected behavior, bug, or error labels Nov 16, 2017
@berkerpeksag
Copy link
Member

  1. Don't reopen a closed issue.
  2. Please use python-list or StackOverflow for usage questions. You need to replace 'pip' with 'pip3' in your case. If you get a similar error with 'pip3', try 'sudo pip3 install -U ...' or 'pip3 install --user -U ...'.

@berkerpeksag berkerpeksag added type-bug An unexpected behavior, bug, or error and removed type-crash A hard crash of the interpreter, possibly with a core dump labels Nov 16, 2017
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-installation type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant