0%

conda命令出现unexpected error

执行 conda 命令时,报错。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
$ /opt/anaconda3/bin/conda create -n py38 python=3.8`

environment variables:
CIO_TEST=<not set>
CLASSPATH=.:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/lib/
tools.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/H
ome/lib/dt.jar
CONDA_DEFAULT_ENV=base
CONDA_EXE=/opt/anaconda3/bin/conda
CONDA_PREFIX=/opt/anaconda3
CONDA_PROMPT_MODIFIER=(base)
CONDA_PYTHON_EXE=/opt/anaconda3/bin/python
CONDA_ROOT=/opt/anaconda3
CONDA_SHLVL=1
CURL_CA_BUNDLE=<not set>
GOPATH=/Users/simon/Development/workspace/go
PATH=/opt/anaconda3/bin:/Users/simon/.yarn/bin:/Users/simon/.config/yarn/gl
obal/node_modules/.bin:/Users/simon/opt/anaconda3/bin:/Users/simon/opt
/anaconda3/bin:/anaconda3/bin:/Library/Frameworks/Python.framework/Ver
sions/3.6/bin:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Conten
ts/Home/bin:/Users/simon/Development/maven/apache-maven-3.6.1/bin:/Use
rs/simon/.yarn/bin:/Users/simon/.config/yarn/global/node_modules/.bin:
/opt/anaconda3/bin:/opt/anaconda3/condabin:/Users/simon/opt/anaconda3/
bin:/Users/simon/opt/anaconda3/bin:/anaconda3/bin:/Library/Frameworks/
Python.framework/Versions/3.6/bin:/Library/Java/JavaVirtualMachines/jd
k1.8.0_92.jdk/Contents/Home/bin:/Users/simon/Development/maven/apache-
maven-3.6.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applicat
ions/VMware Fusion.app/Contents/Public:/usr/local/go/bin:/usr/local/go
/bin:/Users/simon/Development/workspace/go/bin:/usr/local/go/bin:/User
s/simon/Development/workspace/go/bin
REQUESTS_CA_BUNDLE=<not set>
SSL_CERT_FILE=<not set>

active environment : base
active env location : /opt/anaconda3
shell level : 1
user config file : /Users/simon/.condarc
populated config files : /Users/simon/.condarc
conda version : 4.13.0
conda-build version : 3.18.11
python version : 3.7.6.final.0
virtual packages : __osx=10.15.7=0
__unix=0=0
__archspec=1=x86_64
base environment : /opt/anaconda3 (writable)
conda av data dir : /opt/anaconda3/etc/conda
conda av metadata url : None
channel URLs : https://pypi.ricequant.com/simple/osx-64
https://pypi.ricequant.com/simple/noarch
https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/osx-64
https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/noarch
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/osx-64
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/noarch
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/osx-64
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/noarch
package cache : /opt/anaconda3/pkgs
/Users/simon/.conda/pkgs
envs directories : /opt/anaconda3/envs
/Users/simon/.conda/envs
platform : osx-64
user-agent : conda/4.13.0 requests/2.22.0 CPython/3.7.6 Darwin/19.6.0 OSX/10.15.7
UID:GID : 501:20
netrc file : None
offline mode : False


An unexpected error has occurred. Conda has prepared the above report.

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]:

解决方案:

1
2
3
4
5
6
7
8
9
$ conda config --show-sources
==> /Users/somebody/.condarc <==
ssl_verify: True
channels:
- https://pypi.ricequant.com/simple
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
show_channel_urls: True

删除 /Users/somebody/.condarc,就可以解决了。