今天又遇上了很奇怪的问题,之前conda都是正常的,刚才想看一下当前环境的已安装包,直接给了个警告:
(python_36) PS F:……路径> conda list
WARNING: The conda.compat module is deprecated and will be removed in a future release.
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "C:\Users\admin\Anaconda3\lib\site-packages\conda\exceptions.py", line 1003, in __call__
return func(*args, **kwargs)
File "C:\Users\admin\Anaconda3\lib\site-packages\conda\cli\main.py", line 84, in _main
exit_code = do_call(args, p)
File "C:\Users\admin\Anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 82, in do_call
exit_code = getattr(module, func_name)(args, parser)
File "C:\Users\admin\Anaconda3\lib\site-packages\conda\cli\main_list.py", line 142, in execute
show_channel_urls=context.show_channel_urls)
File "C:\Users\admin\Anaconda3\lib\site-packages\conda\cli\main_list.py", line 80, in print_packages
show_channel_urls=show_channel_urls)
File "C:\Users\admin\Anaconda3\lib\site-packages\conda\cli\main_list.py", line 45, in list_packages
installed = sorted(PrefixData(prefix, pip_interop_enabled=True).iter_records(),
File "C:\Users\admin\Anaconda3\lib\site-packages\conda\core\prefix_data.py", line 117, in iter_records
……
(中间还有很多信息就不复制过来了)
……
An unexpected error has occurred. Conda has prepared the above report.
查了一圈 说这是conda4.6.11版本通病,看了下当前版本,哦哟还真是4.6.11
(python_36) PS F:……路径> conda --version
conda 4.6.11
好嘛看样子要升级conda版本,但是运行 conda update conda 或者 conda update -n base -c defaults conda 都不行,提示如下:
(python_36) PS F:……路径> conda update conda
WARNING: The conda.compat module is deprecated and will be removed in a future release.
PackageNotInstalledError: Package is not installed in prefix.
prefix: C:\Users\admin\Anaconda3\envs\python_36
package name: conda
(python_36) PS F:……路径> conda update -n base -c defaults conda
WARNING: The conda.compat module is deprecated and will be removed in a future release.
Collecting package metadata: failed
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/free/noarch/repodata.json.bz2>
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
If your current network has https://www.anaconda.com blocked, please file
a support request with your network engineering team.
SSLError(MaxRetryError('HTTPSConnectionPool(host=\'repo.anaconda.com\', port=443): Max retries exceeded with url: /pkgs/free/noarch/repodata.json.bz2 (Caused by SSLError("Can\'t connect to HTTPS URL because the SSL module is not available."))'))
尝试了删除channel路径:conda config --remove-key channels 还是不行
(这里删除前可以:conda config --show 查看channels里的路径,在-defalut前面的路径都删掉)
又尝试了切换本机环境下更新,也是不行
最终在base环境下更新成功
(base) PS F:……路径> conda --version
conda 4.10.3
conda命令可以正常使用了 : D