Python 通过命令行在 Ubuntu(或 Linux)上安装 Anaconda

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/28852841/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-19 03:49:56  来源:igfitidea点击:

Install Anaconda on Ubuntu (or Linux) via command line

pythonsshcommand-lineserveranaconda

提问by JNevens

I would like to install Anacondaon a remote server.

我想在远程服务器上安装Anaconda

The server is running Ubuntu 12.04.

服务器正在运行 Ubuntu 12.04。

I only have access to this server via SSH.

我只能通过 SSH 访问该服务器。

How can I install Anaconda via the command line?

如何通过命令行安装 Anaconda?

采纳答案by Greg Lever

Something along the lines of:

类似的东西:

wget http://09c8d0b2229f813c1b93-c95ac804525aac4b6dba79b00b39d1d3.r79.cf1.rackcdn.com/Anaconda-2.1.0-Linux-x86_64.sh

to get the installer for 64 bit linux followed by:

获取 64 位 linux 的安装程序,然后是:

bash Anaconda-2.x.x-Linux-x86[_64].sh

回答by kmario23

Please take a look at the Anaconda repo archive pageand select an appropriate version that you'd like to install.

请查看Anaconda 存储库存档页面并选择您要安装的适当版本。

After that, just do:

之后,只需执行以下操作:

 # replace this `Anaconda3-version.num-Linux-x86_64.sh` with your choice
~$ wget -c https://repo.continuum.io/archive/Anaconda3-vers.num-Linux-x86_64.sh
~$ bash Anaconda3-version.num-Linux-x86_64.sh


Concrete Example:

具体例子:

As of this writing, Anaconda3-5.0.1is the latest version. So,

在撰写本文时,Anaconda3-5.0.1是最新版本。所以,

$ wget -c https://repo.continuum.io/archive/Anaconda3-5.0.1-Linux-x86_64.sh
$ bash Anaconda3-5.0.1-Linux-x86_64.sh

回答by rjrajsaha

$ sudo bash Anaconda2-4.3.0-Linux-x86_64.sh

Video tutorial:: https://youtu.be/JP60kTsVJ8E

视频教程:: https://youtu.be/JP60kTsVJ8E

回答by Prashant Kumar

Just download the anaconda installer and execute it as it is a shell script. Follow the steps :

只需下载 anaconda 安装程序并执行它,因为它是一个 shell 脚本。按照步骤 :

  1. In the terminal type "wget https://repo.continuum.io/archive/Anaconda-2.3.0-Linux-x86_64.sh"

  2. The file will be downloaded in current directory. Now execute the downloaded file by "bash ./Anaconda-2.3.0-Linux-x86_64.sh"

  3. Restart the terminal. This is very important for python version provided by anaconda to be set to default for that user.

  1. 在终端输入“wget https://repo.continuum.io/archive/Anaconda-2.3.0-Linux-x86_64.sh

  2. 该文件将下载到当前目录中。现在通过“bash ./Anaconda-2.3.0-Linux-x86_64.sh”执行下载的文件

  3. 重启终端。这对于将 anaconda 提供的 python 版本设置为该用户的默认值非常重要。

Note- Try using environment for using different version of python. Changing the default python version for root might result in non functioning of some functionalities like yum.

注意 - 尝试使用环境来使用不同版本的 python。更改 root 的默认 Python 版本可能会导致某些功能(如 yum)无法运行。

回答by Michael James Kali Galarnyk

You can do as Prashant said or you can use bash scripts to automate the installation. Just simply copy and paste depending on the version of Python you want

您可以按照 Prashant 所说的去做,也可以使用 bash 脚本来自动安装。只需根据您想要的 Python 版本简单地复制和粘贴

If you are trying to it entirely in command line you use a bash script python 2 anaconda install bash script:

如果您完全在命令行中尝试使用 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 

# Refresh basically
source .bashrc

conda update conda

python 3 anaconda install bash script

python 3 anaconda 安装 bash 脚本

# 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 

# Refresh basically
source .bashrc

conda update conda

Source: https://medium.com/@GalarnykMichael/install-python-on-ubuntu-anaconda-65623042cb5a

来源:https: //medium.com/@GalarnykMichael/install-python-on-ubuntu-anaconda-65623042cb5a

回答by Pablo Ruiz Ruiz

1 - Go to Anaconda Repository, find the installation for your OS and copy the address

1 - 转到Anaconda Repository,找到您的操作系统的安装并复制地址

2 - wget {paste}. Ex: https://repo.continuum.io/archive/Anaconda3-5.2.0-Linux-x86_64.sh

2 - wget {paste}。例如:https: //repo.continuum.io/archive/Anaconda3-5.2.0-Linux-x86_64.sh

3 - Execute with: bash. Ex: bash Anaconda3-5.2.0-Linux-x86_64.sh

3 - 执行:bash。前任:bash Anaconda3-5.2.0-Linux-x86_64.sh

Run!

跑!