alv*_*vas 94 python apt software-installation anaconda
如何在 Ubuntu 上为 Python安装Anaconda?
有没有办法使用apt-get install?
我只有命令行访问我的服务器。如何从命令行在 Ubuntu 14.04 上安装 Anaconda?
Viv*_*vek 77
您可以使用wget从命令行下载:
对于 Python3:
32位版本:
wget https://repo.anaconda.com/archive/Anaconda3-2020.02-Linux-x86.sh
Run Code Online (Sandbox Code Playgroud)64位版本
wget https://repo.anaconda.com/archive/Anaconda3-2020.02-Linux-x86_64.sh
Run Code Online (Sandbox Code Playgroud)下载完成后,请执行以下操作:
32 位:
bash Anaconda3-2020.02-Linux-x86.sh
Run Code Online (Sandbox Code Playgroud)64 位:
bash Anaconda3-2020.02-Linux-x86_64.sh
Run Code Online (Sandbox Code Playgroud)对于使用Python2的用户,Anaconda后面的“3”应该改为2。
来源:https : //conda.io/docs/user-guide/install/linux.html
v2r*_*v2r 63
有关更多详细信息,请参阅Anaconda Hompepage!
安装说明【Linux安装】
这些说明解释了如何在 Linux 系统上安装 Anaconda。
后下载的Anaconda安装,运行从终端下面的命令:
$ bash Anaconda-2.x.x-Linux-x86[_64].sh
Run Code Online (Sandbox Code Playgroud)
接受许可条款后,系统会要求您指定安装位置(默认为~/anaconda)。
注意:安装 Anaconda 不需要 root 权限,如果选择用户可写的安装位置,例如~/anaconda.*自解压完成后,您应该将 anaconda 二进制目录添加到您的 PATH 环境变量中。
由于所有 Anaconda 都包含在一个目录中,因此卸载 Anaconda 很容易(您只需删除整个安装位置目录)。
如果您遇到任何问题,请尝试禁用您的防病毒软件。Linux/OS X 卸载
由于所有 Anaconda 都包含在一个目录中,因此卸载 Anaconda 很简单(您只需删除整个安装位置目录):
$ rm -rf ~/anaconda
Run Code Online (Sandbox Code Playgroud)
use*_*227 56
没有人在这里解释为什么apt-get其他包管理器没有用于 anaconda 的包。
这样做的一个重要原因是 anaconda 旨在供无论出于何种原因没有 root 权限的用户使用。在这种情况下,用户只需安装到~/anaconda,更改她自己的PATH和PYTHONHOME变量以运行~/anaconda/python,并且能够控制她的个人 python 分发,而修改“系统”python 可能需要管理员的帮助。
包管理器总是需要系统管理员权限。
小智 21
如果您完全在命令行中尝试使用 bash 脚本 python 2 anaconda install bash script:
# Go to home directory
cd ~
# You can change what anaconda version you want at
# https://repo.continuum.io/archive/
wget https://repo.continuum.io/archive/Anaconda2-4.2.0-Linux-x86_64.sh
bash Anaconda2-4.2.0-Linux-x86_64.sh -b -p ~/anaconda
rm Anaconda2-4.2.0-Linux-x86_64.sh
echo 'export PATH="~/anaconda/bin:$PATH"' >> ~/.bashrc
# Reload default profile
source ~/.bashrc
conda update conda
Run Code Online (Sandbox Code Playgroud)
# Go to home directory
cd ~
# You can change what anaconda version you want at
# https://repo.continuum.io/archive/
wget https://repo.continuum.io/archive/Anaconda3-4.2.0-Linux-x86_64.sh
bash Anaconda3-4.2.0-Linux-x86_64.sh -b -p ~/anaconda
rm Anaconda3-4.2.0-Linux-x86_64.sh
echo 'export PATH="~/anaconda/bin:$PATH"' >> ~/.bashrc
# Reload default profile
source ~/.bashrc
conda update conda
Run Code Online (Sandbox Code Playgroud)
来源:https : //medium.com/@GalarnykMichael/install-python-on-ubuntu-anaconda-65623042cb5a
tho*_*olf 12
除了@Vivek 的回答,要获得最新的 python3 64 位 Linux 版本:
CONTREPO=https://repo.continuum.io/archive/
# Stepwise filtering of the html at $CONTREPO
# Get the topmost line that matches our requirements, extract the file name.
ANACONDAURL=$(wget -q -O - $CONTREPO index.html | grep "Anaconda3-" | grep "Linux" | grep "86_64" | head -n 1 | cut -d \" -f 2)
wget -O ~/Downloads/anaconda.sh $CONTREPO$ANACONDAURL
bash ~/Downloads/anaconda.sh -b -p $HOME/anaconda3
Run Code Online (Sandbox Code Playgroud)
grep当然,可以更改第 3 行中的过滤器以满足您的要求。
问:这里发生了什么?
wget -q -O - URL悄悄地 ( -q) 获取 html URL(在本例中为https://repo.continuum.io/archive/,访问方式为$CONTREPO) 并将其发送到标准输出 ( -O -)。grep "text"从其输入返回包含text. 因此,首先,我们选择包含“Anaconda3”的所有行,然后选择包含“Linux”的所有行,然后选择包含“86_64”的所有行(对于 64 位版本)。head -n 1返回输入的第一行。我依靠网站维护秩序,以便最新版本在最前面。cut -d \" -f 2-d \"在 HTML 的 href 中围绕文件名的双引号字符 ( )上拆分输入,并返回-f 2作为 href 目标的第二个字段 ( )。-b -p path选项使安装成为非交互式“ silent-mode ”,在这种情况下,您以静默方式接受许可证并且不需要确认安装路径。小智 5
安装 Python 3.6 版本
sudo bash Anaconda3-4.3.0-Linux-x86_64.sh
Run Code Online (Sandbox Code Playgroud)
对于 Python 2.7 版本
sudo bash Anaconda2-4.3.0-Linux-x86_64.sh
Run Code Online (Sandbox Code Playgroud)
运行导航器
anaconda-navigator
Run Code Online (Sandbox Code Playgroud)
运行 Spyder IDE
spyder
Run Code Online (Sandbox Code Playgroud)
运行 Jupyter Notebook
jupyter-notebook
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
439667 次 |
| 最近记录: |