by Nandhini Saravanan
通过Nandhini Saravanan
Anaconda简介:它是什么,以及如何安装 (An introduction to Anaconda: what it is, and how to install it)
Anaconda及其在Ubuntu 16.04(64位)上的安装的简单指南。 (A simple guide to Anaconda and its installation on Ubuntu 16.04 (64-bit).)
Hey everyone. I wrote this post to guide you through how Anaconda is installed in Ubuntu versions. Additionally, it covers various details about Anaconda and the area in which it is utilized.
嘿大家。 我写这篇文章是为了指导您如何在Ubuntu版本中安装Anaconda。 此外,它涵盖了有关Anaconda及其使用区域的各种详细信息。
对于初学者来说,Anaconda到底意味着什么? (For starters, what is Anaconda all about?)
Before probing into what Anaconda really means and what it is about, we will first learn about Conda.
在探究Anaconda的真正含义和含义之前,我们将首先了解Conda。
Quoting Conda’s official blog:
引用conda的官方博客:
Conda is an open source package management system and environment management system that runs on Windows, macOS and Linux.
Conda是在Windows,macOS和Linux上运行的开源软件包管理系统和环境管理系统。
Conda quickly installs, runs and updates packages and their dependencies. Conda easily creates, saves, loads and switches between environments on your local computer.
Conda可以快速安装,运行和更新软件包及其依赖项。 Conda可以轻松地在本地计算机上的环境中创建,保存,加载和切换。
It was created for Python programs, but it can package and distribute software for any language.
它是为Python程序创建的,但可以打包和分发适用于任何语言的软件 。
The next question on the table is: why Conda, all of a sudden? We all know that is a package management system used to install and manage software packages written in Python.
桌上的下一个问题是:为什么突然间,Conda? 我们都知道这是一个软件包管理系统,用于安装和管理用Python编写的软件包。
That has its limitation too. It can only be used for Python packages.
那也有其局限性。 它只能用于Python包。
pip
is focused around Python, neglecting non-Python library dependencies, such as HDF5, MKL, LLVM which do not have a setup file in their source code.
pip
专注于Python,忽略了非Python库依赖项,例如HDF5,MKL,LLVM,它们的源代码中没有安装文件。
To put it in simple words:
用简单的话来说:
pip
is a package manager that facilitates installation, upgrade, and uninstallation of python packages. It works with virtual python environments.
pip
是一个软件包管理器,可简化python软件包的安装,升级和卸载。 它适用于虚拟python环境。
Conda
is a package manager for any software (installation, upgrade and uninstallation). It works with virtual system environments.
Conda
是任何软件 (安装,升级和卸载)的软件包管理器。 它适用于虚拟系统环境。
Conda is a packaging tool and installer that aims to do more than what pip
does: handle library dependencies outside of the Python packages as well as the Python packages themselves.
Conda是一个打包工具和安装程序,旨在做的事情比pip
还要多:处理Python包之外的库依赖关系以及Python包本身。
Conda also creates a virtual environment.
conda还创建了一个虚拟环境。
Anaconda如何出现在图片中? (How does Anaconda come into the picture?)
Conda is written entirely in Python which makes it easier to use in Python virtual environments. Furthermore, we can use Conda for C libraries, R packages, Java packages and so on.
Conda完全用Python编写,这使得在Python虚拟环境中使用起来更加容易。 此外,我们可以将Conda用于C库,R包,Java包等。
It installs binaries. The conda build
tool builds packages from source and conda install
installs things from built conda packages.
它安装二进制文件。 conda build
工具从源代码构建软件包, conda install
从构建的conda软件包安装东西。
Conda is the package manager of Anaconda, the Python distribution provided by Continuum Analytics. A skimpy line to describe Anaconda is this:
Conda是Anaconda的软件包经理,Anaconda是Continuum Analytics提供的Python发行版。 一条简短的文字描述Python是这样的:
Anaconda is a python and R distribution. It aims to provide everything you need (python wise) for data science tasks.
Anaconda是python和R发行版。 它旨在提供数据科学任务所需的一切(python明智的选择)。
Anaconda is a set of binaries that includes Scipy, Numpy, Pandas along with all their dependencies.
Anaconda是一组二进制文件,其中包括Scipy,Numpy,Pandas及其所有依赖项。
Scipy is a statistical analysis package.
Scipy是一个统计分析软件包。
Numpy is a numerical computing package .
Numpy是一个数值计算程序包。
Pandas is a data abstraction layer that exposes a way to merge and transform data.
Pandas是数据抽象层,它提供了一种合并和转换数据的方法。
Anaconda helps us by getting all of these together in one single shot.
Anaconda通过将所有这些整合在一起而为我们提供了帮助 。
The Anaconda binary is an installer that builds all of these packages and their dependencies in your system.
Anaconda二进制文件是一个安装程序,可以在您的系统中构建所有这些软件包及其依赖性。
For more information on Anaconda, visit its official blog: https://anaconda.org/
有关Anaconda的更多信息,请访问其官方博客: https : //anaconda.org/
安装简便的方法 (Installing the easier way)
Installing files can be a big major mess sometimes, but Anaconda is a lot more user friendly than you might think. I prefer Ubuntu, as installation just requires a couple of strong commands and a good network connection. It feels a lot easier. Here are the subsequent steps on installation of Anaconda.
有时安装文件可能会造成很大的麻烦,但是Anaconda的用户友好性比您想象的要好得多。 我更喜欢Ubuntu,因为安装只需要几个强大的命令和良好的网络连接。 感觉容易得多。 以下是安装Anaconda的后续步骤。
(This whole installation process works on 64-bit computers alone).
(整个安装过程仅在64位计算机上有效)。
步骤1:下载Anaconda bash脚本 (Step 1: Download the Anaconda bash script)
Download the latest version of the Anaconda installer bash script from their official website. It can be downloaded by running a curl command. If you don’t have curl installed in your system, install it by running the following command.
从其官方网站下载最新版本的Anaconda安装程序bash脚本。 可以通过运行curl命令下载它。 如果您的系统中未安装curl,请通过运行以下命令进行安装。
sudo apt-get updatesudo apt-get install curl
Go to the /tmp folder.
转到/ tmp文件夹。
cd /tmp
After you have installed curl, run the following command using it:
安装curl之后,使用它运行以下命令:
curl -O https://repo.continuum.io/archive/Anaconda3-4.3.1-Linux-x86_64.sh
The setup usually consumes a few minutes as its size is approximately 500 MB. Please wait until the whole download process completes.
该安装程序通常需要花费几分钟,因为其大小约为500 MB。 请等待,直到整个下载过程完成。
The screen shot attached was taken after the script has been downloaded. Make sure you have a strong connection or else download errors might occur.
下载脚本后,拍摄了所附的屏幕截图。 确保连接牢固,否则可能会发生下载错误。
步骤2:验证完整性 (Step 2: Verify the Integrity)
To verify the data integrity of the installer, we use a cryptographic hash algorithm called SHA-2 (Secure Hash Algorithm).
为了验证安装程序的数据完整性,我们使用一种称为SHA-2的加密哈希算法(安全哈希算法)。
sha256sum Anaconda3-4.3.1-Linux-x86_64.sh
A checksum will be generated in the next line after the command is executed.
执行命令后,将在下一行生成校验和。
步骤3:运行bash脚本 (Step 3: Run the bash script)
We are almost there. The package is downloaded and we just have to run the script by typing this command.
我们就快到了。 该软件包已下载,我们只需输入以下命令即可运行脚本。
bash Anaconda3-4.3.1-Linux-x86_64.sh
A normal verification step asks whether you want to install Anaconda. Type yes
so that the installation continues.
常规验证步骤询问您是否要安装Anaconda。 键入yes
以便继续安装。
步骤4:安装密码库 (Step 4: Installing the Cryptographic Libraries)
This is a part of the prior process. The installer asks the user whether they want to install all the cryptographic libraries. Type in yes
and you are good to go. Refer to the screen shot below. You’ll get details similar to it.
这是先前过程的一部分。 安装程序询问用户是否要安装所有密码库。 输入yes
,就可以了。 请参阅下面的屏幕截图。 您将获得与此类似的详细信息。
步骤5:确认位置 (Step 5: Confirm the Location)
The last and final step is confirm the path to where you want to place all the Anaconda packages. After you have specified the path, press Enter and you are done! Anaconda will start working out its magic by installing all the essentials you’ll need!
最后也是最后一步是确认要放置所有Anaconda软件包的路径。 指定路径后,按Enter键即可完成操作! Anaconda将通过安装您需要的所有必需品来开始发挥魔力!
步骤6:激活并验证 (Step 6: Activate and Verify)
In order to activate the installation, we should source the ~/.bashrc
file by typing in the following command:
为了激活安装,我们应该通过输入以下命令来获取~/.bashrc
文件:
source ~/.bashrc
Verify your installation by using the conda
command.
使用conda
命令验证安装。
conda list
The output of all the packages available through the Anaconda installation is displayed.
显示通过Anaconda安装可用的所有软件包的输出。
我写有关人生课程,编码和技术以及书籍的故事。 要了解更多信息,请在Twitter和Medium上关注我。 (I write stories on Life Lessons, Coding and Technology and Books. To read more, follow me on Twitter and Medium.)
翻译自: https://www.freecodecamp.org/news/how-to-install-anaconda-on-ubuntu-16-04-64-bit-6f1c4675ce44/