我无法在Anaconda(Anaconda3-2019.07-Windows-x86_64)中安装任何新软件包,也无法更新其根目录。
执行如下命令:
conda update -n root conda
正在浏览以下错误:
The following packages will be UPDATED:
conda 4.7.10-py37_0 --> 4.7.12-py37_0
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "C:\Anaconda3\lib\site-packages\conda\exceptions.py", line 1062, in __call__
return func(*args, **kwargs)
File "C:\Anaconda3\lib\site-packages\conda\cli\main.py", line 84, in _main
exit_code = do_call(args, p)
File "C:\Anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 82, in do_call
exit_code = getattr(module, func_name)(args, parser)
File "C:\Anaconda3\lib\site-packages\conda\cli\main_update.py", line 20, in execute
install(args, parser, 'update')
File "C:\Anaconda3\lib\site-packages\conda\cli\install.py", line 308, in install
handle_txn(unlink_link_transaction, prefix, args, newenv)
File "C:\Anaconda3\lib\site-packages\conda\cli\install.py", line 337, in handle_txn
unlink_link_transaction.execute()
File "C:\Anaconda3\lib\site-packages\conda\core\link.py", line 240, in execute
self.verify()
File "C:\Anaconda3\lib\site-packages\conda\common\io.py", line 88, in decorated
return f(*args, **kwds)
File "C:\Anaconda3\lib\site-packages\conda\core\link.py", line 227, in verify
exceptions = self._verify(self.prefix_setups, self.prefix_action_groups)
File "C:\Anaconda3\lib\site-packages\conda\core\link.py", line 563, in _verify
if future.result():
File "C:\Anaconda3\lib\concurrent\futures\_base.py", line 425, in result
return self.__get_result()
File "C:\Anaconda3\lib\concurrent\futures\_base.py", line 384, in __get_result
raise self._exception
File "C:\Anaconda3\lib\concurrent\futures\thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "C:\Anaconda3\lib\site-packages\conda\core\link.py", line 383, in _verify_individual_level
error_result = axn.verify()
File "C:\Anaconda3\lib\site-packages\conda\core\path_actions.py", line 957, in verify
touch(user_environments_txt_file, mkdir=True, sudo_safe=True)
File "C:\Anaconda3\lib\site-packages\conda\gateways\disk\update.py", line 107, in touch
mkdir_p_sudo_safe(dirpath)
File "C:\Anaconda3\lib\site-packages\conda\gateways\disk\__init__.py", line 82, in mkdir_p_sudo_safe
mkdir_p_sudo_safe(base_dir)
File "C:\Anaconda3\lib\site-packages\conda\gateways\disk\__init__.py", line 82, in mkdir_p_sudo_safe
mkdir_p_sudo_safe(base_dir)
File "C:\Anaconda3\lib\site-packages\conda\gateways\disk\__init__.py", line 82, in mkdir_p_sudo_safe
mkdir_p_sudo_safe(base_dir)
[Previous line repeated 984 more times]
File "C:\Anaconda3\lib\site-packages\conda\gateways\disk\__init__.py", line 80, in mkdir_p_sudo_safe
base_dir = dirname(path)
File "C:\Anaconda3\lib\ntpath.py", line 221, in dirname
return split(p)[0]
File "C:\Anaconda3\lib\ntpath.py", line 184, in split
seps = _get_bothseps(p)
File "C:\Anaconda3\lib\ntpath.py", line 35, in _get_bothseps
if isinstance(path, bytes):
RecursionError: maximum recursion depth exceeded while calling a Python object
`$ C:\Anaconda3\Scripts\conda-script.py update -n root conda`
environment variables:
CIO_TEST=<not set>
CONDA_DEFAULT_ENV=base
CONDA_EXE=C:\Anaconda3\Scripts\conda.exe
CONDA_PREFIX=C:\Anaconda3
CONDA_PROMPT_MODIFIER=(base)
CONDA_PYTHON_EXE=C:\Anaconda3\python.exe
CONDA_ROOT=C:\Anaconda3
CONDA_SHLVL=1
HOMEPATH=\
PATH=C:\Anaconda3;C:\Anaconda3\Library\mingw-w64\bin;C:\Anaconda3\Library\u
sr\bin;C:\Anaconda3\Library\bin;C:\Anaconda3\Scripts;C:\Anaconda3\bin;
C:\Anaconda3;C:\Anaconda3\Library\mingw-w64\bin;C:\Anaconda3\Library\u
sr\bin;C:\Anaconda3\Library\bin;C:\Anaconda3\Scripts;C:\Anaconda3\bin;
C:\Anaconda3\condabin;C:\Python27;C:\Python27\Scripts;C:\Program Files
(x86)\Common Files\Oracle\Java\javapath;C:\oracle\product\11.2.0\clien
t_1\BIN;C:\Program Files (x86)\Integrity\IntegrityClient10\bin;C:\Prog
ramData\Oracle\Java\javapath;C:\Windows\System32;C:\Windows;C:\Windows
\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program
Files (x86)\Integrity\Toolkit\mksnt;C:\Program
Files\Calibre2;C:\Program Files\MIT\Kerberos\bin;C:\Program Files
(x86)\BaseX\bin;C:\Program Files\Git\cmd;C:\Program Files
(x86)\Airtame;C:\Program Files\FME_2018_64;C:\Program Files\Microsoft
VS Code\bin;C:\Program Files\Couchbase\Server\bin;C:\Windows\System32;
C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerSh
ell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\Microsoft
Visual Studio\2019\Community\VC\Tools\MSVC\14.21.27702\bin\Hostx64\x64
;C:\Anaconda3;C:\Anaconda3\Library\mingw-w64\bin;C:\Anaconda3\Library\
usr\bin;C:\Anaconda3\Library\bin;C:\Anaconda3\Scripts;C:\Python3\Scrip
ts;C:\Python3;C:\Program Files\JetBrains\PyCharm
Community Edition 2019.2.2\bin
PSMODULEPATH=C:\Users\anderson\Documents\WindowsPowerShell\Modules;C:\Program Files\
WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\M
odules
REQUESTS_CA_BUNDLE=<not set>
SSL_CERT_FILE=<not set>
active environment : base
active env location : C:\Anaconda3
shell level : 1
user config file : U:\.condarc
populated config files :
conda version : 4.7.10
conda-build version : 3.18.8
python version : 3.7.3.final.0
virtual packages : __cuda=9.1
base environment : C:\Anaconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
package cache : C:\Anaconda3\pkgs
U:\.conda\pkgs
C:\Users\anderson\AppData\Local\conda\conda\pkgs
envs directories : C:\Anaconda3\envs
U:\.conda\envs
C:\Users\anderson\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.7.10 requests/2.22.0 CPython/3.7.3 Windows/10 Windows/10.0.17763
administrator : True
netrc file : None
offline mode : False
An unexpected error has occurred. Conda has prepared the above report.
有人知道如何解决吗? 重新安装整个Anaconda软件包无法修复。我已经使用Anaconda超过2年了,因为最近进行了一些升级,所以遇到了这个问题。我以管理员身份运行命令。似乎伪造的是“ U:\”路径。我没有这样的驱动器,也从未在安装过程中选择它。
当我运行此cmd时:
conda config --set report_errors true
我收到此错误:
CondaError: Cannot write to condarc file at U:\.condarc
Caused by FileNotFoundError(2, 'No such file or directory')
我的“ condarc”文件位于“ C:\ Anaconda3 \ pkgs \ conda-4.7.10-py37_0 \ info \ test \ tests”上,因此为什么要在“ U:\。condarc”目录中查找它。 / p>
答案 0 :(得分:1)
该问题是由于存在环境变量“ HOME”和“ U:\”值引起的,该值过去通过一些未知操作进行了这样的设置。将其更改为“ C:\ Users \ anderson”已解决的问题。