【发布时间】:2020-10-07 18:55:34
【问题描述】:
我正在使用Ubuntu 20 focal,在Anaconda 安装过程和操作方面遇到问题。使用文件:Anaconda3-2020.07-Linux-x86_64.sh,并通过:sudo bash Anaconda3-2020.07-Linux-x86_64.sh 运行
我在欢迎信息后按ENTER,浏览所有协议消息并按我同意的yes,然后查看回复:
Please answer 'yes' or 'no':'
>>> yes
Anaconda3 will now be installed into this location:
/root/anaconda3
- Press ENTER to confirm the location
- Press CTRL-C to abort the installation
- Or specify a different location below
[/root/anaconda3] >>>
然后我按ENTER,开始安装,现在安装在
$ sudo ls /root/
anaconda3
但是,在此之后,预期的命令不起作用,例如;
$ conda list
conda: command not found
我无法使用 conda 卸载命令,我想知道安装过程应该如何进行。安装没有在~/中放置任何文件。
我也有一个Julia lang 安装,并且有一个来自 environment.txt 文件的引用;
$ ls ~/.conda/
environments.txt
usr3@usr3:~$ ls ~/.conda/environments.txt
.conda/environments.txt
usr3@usr3:~$ head ~/.conda/environments.txt
/home/usr3/.julia/conda/3
usr3@usr3:~$ ls /home/usr3/.julia/conda/
3/ deps.jl
usr3@usr3:~$ ls /home/usr3/.julia/conda/3/
bin/ installer.sh
compiler_compat/ lib/
condabin/ LICENSE.txt
conda-meta/ pkgs/
condarc-julia.yml share/
envs/ shell/
etc/ ssl/
include/ x86_64-conda_cos6-linux-gnu/
【问题讨论】:
-
真的需要
sudo吗?这主要适用于管理多用户安装的系统管理员;典型安装从不需要提升权限。 -
@merv,我出于习惯使用了
sudo。不假思索就来了。在尝试不使用 sudo 后,安装推荐了一个预期的目录>>> yes Anaconda3 will now be installed into this location: /home/resort/anaconda3 - Press ENTER to confirm the location - Press CTRL-C to abort the installation - Or specify a different location below [/home/usr3/anaconda3] >>> ERROR: File or directory already exists: '/home/resort/anaconda3' If you want to update an existing installation, use the -u option.虽然这似乎是一个进步,但这个新安装并没有参与conda -
您是否运行了
/home/resort/anaconda3/bin/conda init,然后重新启动了shell? -
@merv,
/home/resort/anaconda3/bin没有conda-init文件。它还有其他文件,例如conda-build -
应该只有
conda;init是一个参数。
标签: python linux ubuntu anaconda conda