Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/348.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如何使用wget安装最新的Anaconda_Python_Linux_Wget_Anaconda - Fatal编程技术网

Python 如何使用wget安装最新的Anaconda

Python 如何使用wget安装最新的Anaconda,python,linux,wget,anaconda,Python,Linux,Wget,Anaconda,我正在考虑通过wget在我的服务器上安装anaconda。我遇到过这样的情况,看起来很有希望。在撰写本文时,当前版本()为4.0。如何获取最新版本。wget只需下载文件 对于python 2.7: wget https://repo.continuum.io/archive/Anaconda2-2018.12-Linux-x86_64.sh 对于python3.X: wget https://repo.continuum.io/archive/Anaconda3-2018.12-Linux-x

我正在考虑通过wget在我的服务器上安装anaconda。我遇到过这样的情况,看起来很有希望。在撰写本文时,当前版本()为4.0。如何获取最新版本。

wget只需下载文件

对于python 2.7:

wget https://repo.continuum.io/archive/Anaconda2-2018.12-Linux-x86_64.sh
对于python3.X:

wget https://repo.continuum.io/archive/Anaconda3-2018.12-Linux-x86_64.sh
这是一个引导您完成安装的shell脚本

在下载文件的文件夹内运行以下行以启动引导安装

对于python 2.7:

bash Anaconda2-2018.12-Linux-x86_64.sh
对于Python 3.X:

bash Anaconda3-2018.12-Linux-x86_64.sh
检查最新回购协议,或者如果您需要任何特定版本,请点击此处:

这将为您提供适用于64位Linux环境的最新miniconda 3:

  • 使用wget下载软件
  • 转让执行权
  • 执行并按照说明执行
  • 加载.bashrc以更新PATH环境变量
  • 更新康达
  • 安装pip
  • 创造环境

  • 这将通过从网站上抓取html下载最新的anaconda版本:

    wget -O - https://www.anaconda.com/distribution/ 2>/dev/null | sed -ne 's@.*\(https:\/\/repo\.anaconda\.com\/archive\/Anaconda3-.*-Linux-x86_64\.sh\)\">64-Bit (x86) Installer.*@\1@p' | xargs wget
    

    您可以编写以下bash脚本来自动化安装过程

    cd ~
    
    wget https://repo.continuum.io/archive/Anaconda3-2020.11-Linux-x86_64.sh
    bash Anaconda3-2020.11-Linux-x86_64.sh -b -p ~/anaconda3
    rm Anaconda3-2020.11-Linux-x86_64.sh
    echo 'export PATH="~/anaconda3/bin:$PATH"' >> ~/.bashrc 
    
    # Reload default profile
    conda init
    
    source ~/.bashrc
    
    

    wget只是下载东西。所以只需使用
    wget-URL
    下载URL即可。谢谢,这很有效。我假设.sh表示shell脚本?这不再正确,因为最新的anaconda是5.0.1。我找到了最新的迷你蟒蛇的链接,但找不到最新的蟒蛇的链接。Anaconda 5.1.0正在查找最新版本,并在wget之后进行更改。正如上述评论所指出的那样。在第页找到:行
    /Miniconda3-latest-Linux-x86_64.sh
    上写着
    ,请按ENTER继续。。是否有一个选项可以在没有此提示的情况下执行静默安装?@Regressor(未测试)请尝试
    -b
    选项。另外,
    -help
    提供了安装选项。
    cd ~
    
    wget https://repo.continuum.io/archive/Anaconda3-2020.11-Linux-x86_64.sh
    bash Anaconda3-2020.11-Linux-x86_64.sh -b -p ~/anaconda3
    rm Anaconda3-2020.11-Linux-x86_64.sh
    echo 'export PATH="~/anaconda3/bin:$PATH"' >> ~/.bashrc 
    
    # Reload default profile
    conda init
    
    source ~/.bashrc