_NamespacePath object has no attribute sort (31.0.0)
See original GitHub issueWhen pip installing a package that shares a namespace it fails out on 31.0.0 but installs fine on 28.8.0
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.5/site-packages/setuptools/__init__.py", line 10, in <module>
from setuptools.extern.six.moves import filter, filterfalse, map
File "/usr/lib/python3.5/site-packages/setuptools/extern/__init__.py", line 1, in <module>
from pkg_resources.extern import VendorImporter
File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3015, in <module>
@_call_aside
File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2999, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3043, in _initialize_master_working_set
for dist in working_set
File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3043, in <genexpr>
for dist in working_set
File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2573, in activate
declare_namespace(pkg)
File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2147, in declare_namespace
_handle_ns(packageName, path_item)
File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2087, in _handle_ns
_rebuild_mod_path(path, packageName, module)
File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2116, in _rebuild_mod_path
orig_path.sort(key=position_in_sys_path)
AttributeError: '_NamespacePath' object has no attribute 'sort'
Issue Analytics
- State:
- Created 7 years ago
- Reactions:23
- Comments:73 (37 by maintainers)
Top Results From Across the Web
pip3 error - '_NamespacePath' object has no attribute 'sort'
I have tried running pip3 install --upgrade pip setuptools according to some answers, but every pip command gives me the error. I'm stuck...
Read more >_NamespacePath' object has no attribute 'sort' still not work ...
Python 3.6.5 pip 19.0.2 setuptools 40.8.0 virtualenv 16.0.0 Have ... _NamespacePath' object has no attribute 'sort' still not work #7386.
Read more >attributeError: '_NamespacePath' object has no attribute 'sort'
hello I work on Python 3.6 and I could not install a module : pip3.6 ... attributeError: '_NamespacePath' object has no attribute 'sort'....
Read more >python 2.7 - Pip does not work after upgrade to ubuntu-16.10 - Stack ...
I read that the error is due to setuptools version 31.0.0 and it should be lower than ... AttributeError: '_NamespacePath' object has no...
Read more >解决pip 问题AttributeError: '_NamespacePath' object has no ...
AttributeError : '_NamespacePath' object has no attribute 'sort' ... 简单来说就是:在__init__.py中第2021行orig_path.sort时没有sort属性,参考 ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I modified the function _rebuild_mod_path of the file(
.../site-packages/pip/_vendor/pkg_resources/__init__.py
), which worked:This helped me with the issue