[已解决] 使用conda报错: An unexpected error has occurred. Conda has prepared the above report. Upload did not complete.
文章目录
项目场景:
PS E:\projects\Text2Scene_v3> conda create -n python36 python=3.6
Collecting package metadata (current_repodata.json): failed
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "D:\ProgramFiles\anaconda\lib\site-packages\conda\exceptions.py", line 1079, in __call__
return func(*args, **kwargs)
File "D:\ProgramFiles\anaconda\lib\site-packages\conda\cli\main.py", line 84, in _main
exit_code = do_call(args, p)
File "D:\ProgramFiles\anaconda\lib\site-packages\conda\cli\conda_argparse.py", line 83, in do_call
return getattr(module, func_name)(args, parser)
File "D:\ProgramFiles\anaconda\lib\site-packages\conda\cli\main_create.py", line 41, in execute
install(args, parser, 'create')
File "D:\ProgramFiles\anaconda\lib\site-packages\conda\cli\install.py", line 261, in install
unlink_link_transaction = solver.solve_for_transaction(
File "D:\ProgramFiles\anaconda\lib\site-packages\conda\core\solve.py", line 114, in solve_for_transaction
unlink_precs, link_precs = self.solve_for_diff(update_modifier, deps_modifier,
File "D:\ProgramFiles\anaconda\lib\site-packages\conda\core\solve.py", line 157, in solve_for_diff
final_precs = self.solve_final_state(update_modifier, deps_modifier, prune, ignore_pinned,
File "D:\ProgramFiles\anaconda\lib\site-packages\conda\core\solve.py", line 262, in solve_final_state
ssc = self._collect_all_metadata(ssc)
File "D:\ProgramFiles\anaconda\lib\site-packages\conda\common\io.py", line 88, in decorated
return f(*args, **kwds)
File "D:\ProgramFiles\anaconda\lib\site-packages\conda\core\solve.py", line 425, in _collect_all_metadata
index, r = self._prepare(prepared_specs)
File "D:\ProgramFiles\anaconda\lib\site-packages\conda\core\solve.py", line 1020, in _prepare
reduced_index = get_reduced_index(self.prefix, self.channels,
File "D:\ProgramFiles\anaconda\lib\site-packages\conda\core\index.py", line 288, in get_reduced_index
new_records = SubdirData.query_all(spec, channels=channels, subdirs=subdirs,
File "D:\ProgramFiles\anaconda\lib\site-packages\conda\core\subdir_data.py", line 140, in query_all
result = tuple(concat(executor.map(subdir_query, channel_urls)))
File "D:\ProgramFiles\anaconda\lib\concurrent\futures\_base.py", line 611, in result_iterator
yield fs.pop().result()
File "D:\ProgramFiles\anaconda\lib\concurrent\futures\_base.py", line 439, in result
return self.__get_result()
File "D:\ProgramFiles\anaconda\lib\concurrent\futures\_base.py", line 388, in __get_result
raise self._exception
File "D:\ProgramFiles\anaconda\lib\concurrent\futures\thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "D:\ProgramFiles\anaconda\lib\site-packages\conda\core\subdir_data.py", line 132, in <lambda>
subdir_query = lambda url: tuple(SubdirData(Channel(url), repodata_fn=repodata_fn).query(
File "D:\ProgramFiles\anaconda\lib\site-packages\conda\core\subdir_data.py", line 145, in query
self.load()
File "D:\ProgramFiles\anaconda\lib\site-packages\conda\core\subdir_data.py", line 209, in load
_internal_state = self._load()
File "D:\ProgramFiles\anaconda\lib\site-packages\conda\core\subdir_data.py", line 371, in _load
raw_repodata_str = fetch_repodata_remote_request(
File "D:\ProgramFiles\anaconda\lib\site-packages\conda\core\subdir_data.py", line 694, in fetch_repodata_remote_request resp = session.get(join_url(url, filename), headers=headers, proxies=session.proxies,
File "D:\ProgramFiles\anaconda\lib\site-packages\requests\sessions.py", line 555, in get
return self.request('GET', url, **kwargs)
File "D:\ProgramFiles\anaconda\lib\site-packages\requests\sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "D:\ProgramFiles\anaconda\lib\site-packages\requests\sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "D:\ProgramFiles\anaconda\lib\site-packages\requests\adapters.py", line 439, in send
resp = conn.urlopen(
File "D:\ProgramFiles\anaconda\lib\site-packages\urllib3\connectionpool.py", line 696, in urlopen
self._prepare_proxy(conn)
File "D:\ProgramFiles\anaconda\lib\site-packages\urllib3\connectionpool.py", line 964, in _prepare_proxy
conn.connect()
File "D:\ProgramFiles\anaconda\lib\site-packages\urllib3\connection.py", line 359, in connect
conn = self._connect_tls_proxy(hostname, conn)
File "D:\ProgramFiles\anaconda\lib\site-packages\urllib3\connection.py", line 500, in _connect_tls_proxy
return ssl_wrap_socket(
File "D:\ProgramFiles\anaconda\lib\site-packages\urllib3\util\ssl_.py", line 432, in ssl_wrap_socket
ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls)
File "D:\ProgramFiles\anaconda\lib\site-packages\urllib3\util\ssl_.py", line 474, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock)
File "D:\ProgramFiles\anaconda\lib\ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "D:\ProgramFiles\anaconda\lib\ssl.py", line 997, in _create
raise ValueError("check_hostname requires server_hostname")
ValueError: check_hostname requires server_hostname
`$ D:\ProgramFiles\anaconda\Scripts\conda-script.py create -n python36 python=3.6`
environment variables:
CIO_TEST=<not set>
CONDA_ROOT=D:\ProgramFiles\anaconda
CURL_CA_BUNDLE=<not set>
HOMEPATH=\Users\admin
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\Sys
tem32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;D:\ProgramF
iles\Git\cmd;C:\Users\admin\AppData\Local\Microsoft\WindowsApps;D:\Pro
gramFiles\Microsoft VS Code\bin;D:\ProgramFiles\anaconda;D:\ProgramFil
es\anaconda\Scripts;D:\ProgramFiles\anaconda\Library\bin;
PSMODULEPATH=C:\Users\admin\Documents\WindowsPowerShell\Modules;C:\Program Files\Wi
ndowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Mod
ules
REQUESTS_CA_BUNDLE=<not set>
SSL_CERT_FILE=<not set>
active environment : None
user config file : C:\Users\admin\.condarc
populated config files : C:\Users\admin\.condarc
conda version : 4.10.1
conda-build version : 3.21.4
python version : 3.8.8.final.0
virtual packages : __cuda=11.4=0
__win=0=0
__archspec=1=x86_64
base environment : D:\ProgramFiles\anaconda (writable)
conda av data dir : D:\ProgramFiles\anaconda\etc\conda
conda av metadata url : https://repo.anaconda.com/pkgs/main
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 : D:\ProgramFiles\anaconda\pkgs
C:\Users\admin\.conda\pkgs
C:\Users\admin\AppData\Local\conda\conda\pkgs
envs directories : D:\ProgramFiles\anaconda\envs
platform : win-64
user-agent : conda/4.10.1 requests/2.25.1 CPython/3.8.8 Windows/10 Windows/10.0.19041
administrator : False
netrc file : None
offline mode : False
An unexpected error has occurred. Conda has prepared the above report.
Upload did not complete.
问题描述:
回归win10,用conda建个虚拟环境,按说不该有什么幺蛾子,然而我一搞,结果可把我吓坏了,长篇大论的报错…
这怎么肥四,这也看不明白----求助网友!搜了如下两句:
An unexpected error has occurred. Conda has prepared the above report.
Upload did not complete.
网友果然花式打法:
解决方案:
- 删除 ~/.condarc (C:\Users\admin)
- conda clean -i 还有clean别的 可以自行去查具体的
- 必杀----关闭VPN!!!
是不是很神奇,让人头大hhh
done
#
# To activate this environment, use
#
# $ conda activate python36
#
# To deactivate an active environment, use
#
# $ conda deactivate