AttributeError: '_NamespacePath' object has no attribute 'sort' when running pipenv on arch
See original GitHub issueI installed pipenv (with pip) on my arch machine recently, and it’s giving me an exception on startup.
Googling around it seems like it might related to this issue: pypa/setuptools#885, but my setuptools is fully updated which seems to be the fix listed in that thread.
output
→ sudo pip install --upgrade pipenv pip setuptools
→ pipenv --help
Traceback (most recent call last):
File "/usr/bin/pipenv", line 7, in <module>
from pipenv import cli
File "/usr/lib/python3.6/site-packages/pipenv/__init__.py", line 13, in <module>
from .cli import cli
File "/usr/lib/python3.6/site-packages/pipenv/cli.py", line 20, in <module>
import pip
File "/usr/lib/python3.6/site-packages/pip/__init__.py", line 26, in <module>
from pip.utils import get_installed_distributions, get_prog
File "/usr/lib/python3.6/site-packages/pip/utils/__init__.py", line 27, in <module>
from pip._vendor import pkg_resources
File "/usr/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3018, in <module>
@_call_aside
File "/usr/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3004, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3046, in _initialize_master_working_set
dist.activate(replace=False)
File "/usr/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2578, in activate
declare_namespace(pkg)
File "/usr/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2152, in declare_namespace
_handle_ns(packageName, path_item)
File "/usr/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2092, in _handle_ns
_rebuild_mod_path(path, packageName, module)
File "/usr/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'
system info
→ pip -V
pip 9.0.1 from /usr/lib/python3.6/site-packages (python 3.6)
→ pip show pipenv
Name: pipenv
Version: 7.0.5
Summary: Sacred Marriage of Pipfile, Pip, & Virtualenv.
Home-page: https://github.com/kennethreitz/pipenv
Author: Kenneth Reitz
Author-email: me@kennethreitz.org
License: MIT
Location: /usr/lib/python3.6/site-packages
Requires: semver, setuptools, pip-tools, pip, pew, virtualenv, requests
→ pip show setuptools
Name: setuptools
Version: 36.4.0
Summary: Easily download, build, install, upgrade, and uninstall Python packages
Home-page: https://github.com/pypa/setuptools
Author: Python Packaging Authority
Author-email: distutils-sig@python.org
License: UNKNOWN
Location: /usr/lib/python3.6/site-packages
Requires:
→ uname -a
Linux jubal 4.12.8-2-ARCH #1 SMP PREEMPT Fri Aug 18 14:08:02 UTC 2017 x86_64 GNU/Linux
→ python -V
Python 3.6.2
Issue Analytics
- State:
- Created 6 years ago
- Comments:23 (15 by maintainers)
Top Results From Across the Web
Python3-pip3 : AttributeError: '_NamespacePath' object has no ...
I am on Ubuntu 16.04 I tried to install Kmodes with pip3 but I get this error. I tried removing pip/pip3 from scratch...
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 >Pipenv on Windows fails AttributeError: 'NoneType' object has ...
Pipenv on Windows fails AttributeError: 'NoneType' object has no attribute 'version_sort'. There is an issue with Python Pipenv on Windows.
Read more >python3 报错AttributeError: '_NamespacePath' object has no ...
python3 报错AttributeError: '_NamespacePath' object has no ... 安装报错AttributeError: '_NamespacePath' object has no attribute 'sort'.
Read more >Attributeerror: '_namespacepath' Object Has No Attribute 'sort'
Python Won T Start After Updating Seaborn Stack Overflow. Pip3 Attributeerror Appears In Ubuntu16 04 Namespacepath Object Has No Attribute ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
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
Try v11.6.0.
I love how solving one problem solves another 😃