问题描述
我有一个奇怪的错误,找不到解决方案.每次启动Anaconda Prompt(运行Windows 10)时,在底部都会出现以下错误.即使我尝试使用conda,我也会收到相同的错误(在安装信息之后).我尝试卸载并重新安装Anaconda甚至Python.直到今天,我从未对Anaconda遇到任何问题.
I have an odd error that I can't find a solution to. Everytime I start the Anaconda Prompt (running Windows 10) I get the following error at the bottom. Even if I try to use conda I get the same error (after the install information). I tried uninstalling and reinstalling Anaconda and even Python. I never had a problem with Anaconda until today.
谢谢,鲍伯
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\Scripts\conda-script.py", line 5, in <module>
sys.exit(conda.cli.main())
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\cli\main.py", line 151, in main
activate.main()
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\cli\activate.py", line 118, in main
from conda.utils import shells
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\utils.py", line 13, in <module>
from .gateways.disk.read import compute_md5sum
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\gateways\disk\read.py", line 22, in <module>
from ...models.channel import Channel
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\models\channel.py", line 9, in <module>
from ..base.context import context
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\base\context.py", line 19, in <module>
from .._vendor.auxlib.path import expand
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\_vendor\auxlib\path.py", line 8, in <module>
import pkg_resources
File "<frozen importlib._bootstrap>", line 961, in _find_and_load
File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 646, in _load_unlocked
File "<frozen importlib._bootstrap>", line 616, in _load_backward_compatible
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\pkg_resources\__init__.py", line 2985, in <module>
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\pkg_resources\__init__.py", line 2971, in _call_aside
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\pkg_resources\__init__.py", line 3013, in _initialize_master_working_set
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\pkg_resources\__init__.py", line 2544, in activate
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\pkg_resources\__init__.py", line 2118, in declare_namespace
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\pkg_resources\__init__.py", line 2058, in _handle_ns
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\pkg_resources\__init__.py", line 2087, in _rebuild_mod_path
AttributeError: '_NamespacePath' object has no attribute 'sort'
当前的conda安装:
Current conda install:
platform : win-64
conda version : 4.3.14
conda is private : False
conda-env version : 4.3.14
conda-build version : not installed
python version : 3.6.0.final.0
requests version : 2.12.4
root environment : C:\ProgramData\Anaconda3 (read only)
default environment : C:\ProgramData\Anaconda3
envs directories : C:\ProgramData\Anaconda3\envs
C:\Users\auser\AppData\Local\conda\conda\envs
C:\Users\auser\.conda\envs
package cache : C:\ProgramData\Anaconda3\pkgs
C:\Users\auser\AppData\Local\conda\conda\pkgs
channel URLs : https://repo.continuum.io/pkgs/free/win-64
https://repo.continuum.io/pkgs/free/noarch
https://repo.continuum.io/pkgs/r/win-64
https://repo.continuum.io/pkgs/r/noarch
https://repo.continuum.io/pkgs/pro/win-64
https://repo.continuum.io/pkgs/pro/noarch
https://repo.continuum.io/pkgs/msys2/win-64
https://repo.continuum.io/pkgs/msys2/noarch
config file : None
offline mode : False
user-agent : conda/4.3.14 requests/2.12.4 CPython/3.6.0 Windows/10 Windows/10.0.15063
推荐答案
我已经通过pip和setuptools的克隆源代码解决了它.然后,使用
i have solved it by clone source code of pip and setuptools. Then, install it using
python setup.py install
通过Anaconda提示.注意:在订单setuptools-> pip中安装软件包.使用setuptools在安装前先运行python bootstrap.py
.
via Anaconda Prompt.Note: Install packages in order setuptools -> pip. With setuptools run python bootstrap.py
before install it.
这篇关于Anaconda提示将无法启动_NamespacePath的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!