环境:ubuntu 16.04
Anaconda3
详情参考:https://blog.csdn.net/zhuiyuanzhongjia/article/details/88830466(如果侵权,速删)
输入:conda --version或者conda相关的命令都报错
输出:ERROR: The install method you used for conda--probably either pip install conda
or easy_install conda
--is not compatible with using conda as an application.
If your intention is to install conda as a standalone application, currently
supported install methods include the Anaconda installer and the miniconda
installer. You can download the miniconda installer from
https://conda.io/miniconda.html.

解决方法:
1添加环境变量
(按理说按照教程一步步安装Anaconda3的话,环境变量是自动添加好的,但是不排除没有自动安装的情况)
sudo vim ~/.bashrc
在文件最后一行加上路径
(其中/home/slave110是电脑的具体路径)
export PATH=/home/slave110/anaconda3/bin:$PATH

别忘记source一下
source ~/.bashrc
然鹅还是报错==

2重新安装anaconda3
重新安装anaconda的话,需要使用命令安装:
bash Anaconda3-5.2.0-Linux-x86_64.sh
因为使用bash Anaconda3-5.2.0-Linux-x86_64.sh命令会提示原目录下已经存在anaconda3,无法安装,或者选择其他目录安装。所以选择强制安装命令:
bash Anaconda3-5.2.0-Linux-x86_64.sh -f
然后就可以啦~~
输入conda --version可以查看conda版本

输入conda list查看conda列表

输入conda info -e查看环境

想激活conda虚拟环境可以用
conda activate pytorch

还是不行,因为我的电脑要使用source,不晓得为啥子
source activate pytorch

这样问题就解决啦~~
网友评论