环境
ubuntu16.04,anconda3
问题描述
Collecting package metadata (current_repodata.json): done
Solving environment: failed
Collecting package metadata (repodata.json): done
Solving environment: done
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "/root/conda3/lib/python2.7/site-packages/conda/exceptions.py", line 1043, in __call__
return func(*args, **kwargs)
File "/root/conda3/lib/python2.7/site-packages/conda/cli/main.py", line 84, in _main
AttributeError: 'module' object has no attribute 'BadZipFile'
`$ /home/every create -n torch1 python=3.6`
environment variables:
CIO_TEST=<not set>
CONDA_ROOT=/root/Anaconda3
LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64
PATH=/root/miniconda2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/cuda-9.0/
bin
REQUESTS_CA_BUNDLE=<not set>
SSL_CERT_FILE=<not set>
active environment : None
user config file : /root/.condarc
populated config files : /root/.condarc
conda version : 4.7.5
conda-build version : not installed
python version : 2.7.16.final.0
virtual packages : __cuda=9.0
base environment : /root/Anaconda3 (writable)
channel URLs : https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
package cache : /root/Anaconda3/pkgs
/root/.conda/pkgs
envs directories : /root/Anaconda3/envs
/root/.conda/envs
platform : linux-64
user-agent : conda/4.7.5 requests/2.22.0 CPython/2.7.16 Linux/4.4.0-150-generic ubuntu/16.04.1 glibc/2.23
UID:GID : 0:0
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]: n
No report sent. To permanently opt-out, use
$ conda config --set report_errors false
问题解决
1、有人说是 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/的问题,于是使用命令
conda config --remove channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
将其移除
接着使用命令查看当前清华源
conda config --show channels
确定移除后,重试无效
2、有人建议重装Anconda,但是由于内置了很多虚拟环境,比如tensorflow,pytorch等,装的时候也很麻烦,所以这种方法是下下策,不建议。(其实有人说Anaconda是为windows设计的,在linux的体验并不好,因此尽量不要在linux中使用,但是奈何conda好用嘞,所以不是万般无奈也不舍得舍弃掉)
3、没有办法,Googel了一下,说是conda版本不是最新的原因,于是只用了两条命令
conda update --all
...
Proceed ([y]/n)? y #确认更新
切记,此命令在conda base下执行,因为只用base下有conda
conda update conda
现在再试试使用Anaconda创建虚拟环境,完全好了。