一:出现报错情况
在创建conda虚拟环境的过程中发现以下报错
Retrieving notices: ...working... failed
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "/home/pdn/anaconda3/lib/python3.11/site-packages/conda/exception_handler.py", line 17, in __call__
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/pdn/anaconda3/lib/python3.11/site-packages/conda/cli/main.py", line 64, in main_subshell
exit_code = do_call(args, parser)
^^^^^^^^^^^^^^^^^^^^^
File "/home/pdn/anaconda3/lib/python3.11/site-packages/conda/cli/conda_argparse.py", line 167, in do_call
result = getattr(module, func_name)(args, parser)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pdn/anaconda3/lib/python3.11/site-packages/conda/notices/core.py", line 108, in wrapper
channel_notice_set = retrieve_notices(
^^^^^^^^^^^^^^^^^
File "/home/pdn/anaconda3/lib/python3.11/site-packages/conda/notices/core.py", line 40, in retrieve_notices
channel_notice_responses = fetch.get_notice_responses(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pdn/anaconda3/lib/python3.11/site-packages/conda/notices/fetch.py", line 39, in get_notice_responses
return tuple(
^^^^^^
File "/home/pdn/anaconda3/lib/python3.11/site-packages/conda/notices/fetch.py", line 42, in <genexpr>
(
File "/home/pdn/anaconda3/lib/python3.11/concurrent/futures/_base.py", line 619, in result_iterator
yield _result_or_cancel(fs.pop())
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pdn/anaconda3/lib/python3.11/concurrent/futures/_base.py", line 317, in _result_or_cancel
return fut.result(timeout)
^^^^^^^^^^^^^^^^^^^
File "/home/pdn/anaconda3/lib/python3.11/concurrent/futures/_base.py", line 456, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/home/pdn/anaconda3/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/home/pdn/anaconda3/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pdn/anaconda3/lib/python3.11/site-packages/conda/notices/fetch.py", line 45, in <lambda>
lambda args: get_channel_notice_response(*args), url_and_names
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pdn/anaconda3/lib/python3.11/site-packages/conda/notices/cache.py", line 36, in wrapper
return_value = func(url, name)
^^^^^^^^^^^^^^^
File "/home/pdn/anaconda3/lib/python3.11/site-packages/conda/notices/fetch.py", line 61, in get_channel_notice_response
resp = session.get(
^^^^^^^^^^^^
File "/home/pdn/anaconda3/lib/python3.11/site-packages/requests/sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pdn/anaconda3/lib/python3.11/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pdn/anaconda3/lib/python3.11/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pdn/anaconda3/lib/python3.11/site-packages/requests/adapters.py", line 454, in send
conn = self.get_connection(request.url, proxies)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pdn/anaconda3/lib/python3.11/site-packages/requests/adapters.py", line 350, in get_connection
proxy_manager = self.proxy_manager_for(proxy)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pdn/anaconda3/lib/python3.11/site-packages/requests/adapters.py", line 215, in proxy_manager_for
manager = self.proxy_manager[proxy] = SOCKSProxyManager(
^^^^^^^^^^^^^^^^^^
File "/home/pdn/anaconda3/lib/python3.11/site-packages/urllib3/contrib/socks.py", line 198, in __init__
raise ValueError("Unable to determine SOCKS version from %s" % proxy_url)
ValueError: Unable to determine SOCKS version from socks://127.0.0.1:7890/
`$ /home/pdn/anaconda3/bin/conda create -n mvsnet python=3.7`
environment variables:
ALL_PROXY=<set>
CIO_TEST=<not set>
CONDA_DEFAULT_ENV=base
CONDA_EXE=/home/pdn/anaconda3/bin/conda
CONDA_PREFIX=/home/pdn/anaconda3
CONDA_PROMPT_MODIFIER=(base)
CONDA_PYTHON_EXE=/home/pdn/anaconda3/bin/python
CONDA_ROOT=/home/pdn/anaconda3
CONDA_SHLVL=1
CURL_CA_BUNDLE=<not set>
LD_LIBRARY_PATH=/opt/thinlinc/lib64:/opt/thinlinc/lib
LD_PRELOAD=<not set>
NO_PROXY=<set>
PATH=/home/pdn/anaconda3/bin:/home/pdn/anaconda3/condabin:/bin:/usr/bin:/op
t/thinlinc/bin:/usr/local/bin:/usr/bin/X11:/sbin:/usr/sbin:/usr/local/
sbin:/snap/bin:/opt/thinlinc/sbin
PULSE_RUNTIME_PATH=/var/opt/thinlinc/sessions/pdn/11/pulse
REQUESTS_CA_BUNDLE=<not set>
SSL_CERT_FILE=<not set>
all_proxy=<set>
no_proxy=<set>
active environment : base
active env location : /home/pdn/anaconda3
shell level : 1
user config file : /home/pdn/.condarc
populated config files : /home/pdn/.condarc
conda version : 23.7.4
conda-build version : 3.26.1
python version : 3.11.5.final.0
virtual packages : __archspec=1=x86_64
__cuda=12.2=0
__glibc=2.31=0
__linux=5.15.0=0
__unix=0=0
base environment : /home/pdn/anaconda3 (writable)
conda av data dir : /home/pdn/anaconda3/etc/conda
conda av metadata url : None
channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /home/pdn/anaconda3/pkgs
/home/pdn/.conda/pkgs
envs directories : /home/pdn/anaconda3/envs
/home/pdn/.conda/envs
platform : linux-64
user-agent : conda/23.7.4 requests/2.31.0 CPython/3.11.5 Linux/5.15.0-91-generic ubuntu/20.04.6 glibc/2.31 aau/0.4.2 c/pGtD7hHiZtZRI4tfxn_1PQ s/IzgxM8NYeZe72O6EBxOATA e/3tY0RA_01FiMwoquUJPefg
UID:GID : 1001:1001
netrc file : None
offline mode : False
An unexpected error has occurred. Conda has prepared the above report.
If you suspect this error is being caused by a malfunctioning plugin,
consider using the --no-plugins option to turn off plugins.
Example: conda --no-plugins install <package>
Alternatively, you can set the CONDA_NO_PLUGINS environment variable on
the command line to run the command without plugins enabled.
Example: CONDA_NO_PLUGINS=true conda install <package>
If submitted, this report will be used by core maintainers to improve
future releases of conda.
Would you like conda to send this report to the core maintainers? [y/N]: y
Upload did not complete.
Thank you for helping to improve conda.
Opt-in to always sending reports (and not see this message again)
by running
$ conda config --set report_errors true
二:出现报错原因
出现这种报错可能出现的情况是 .condarc 文件没有删除。
删除这个文件不会对系统造成太大的影响,但在删除之前,最好确保了解它的内容以及删除可能带来的影响。如果后续需要继续使用conda的话,并且希望自定义一些配置选项,可以重新生成 .condarc 文件或手动编辑配置。
同时为了保险起见,我把梯子全部关掉了,如果失败可能是因为挂了梯子。
三:解决报错
首先查看是否存在 .condarc 文件
conda config --show-sources
若存在,删掉即可
rm -rf ~/.condarc
这样就删掉.condarc 文件啦,重新启动一下将可以创建新的虚拟环境了。