Anaconda introduction and Ubuntu/windows installation Anaconda

Most Python beginners have had a headache for configuration environment problems or choosing a convenient editor, so it is recommended to use Anaconda to manage your installation environment and various toolkits.


What is Anaconda?

Anaconda is a Python distribution focused on data analysis, including more than 190 scientific packages and their dependencies, such as conda and Python. As a curious baby, did you discover a new term conda, then you must ask what conda is?

What is conda?

You can use conda to install, update, and uninstall toolkits, and it focuses more on data science-related toolkits. When installing anaconda, it is pre-integrated with packages commonly used in data analysis such as Numpy, Scipy, pandas, and Scikit-learn. It is also worth mentioning that conda not only manages Python toolkits, it can also install non-python packages. For example, in the new version of Anaconda, you can install the R language integrated development environment Rstudi

The advantages of Anaconda?


How to install Anaconda?

You can download the Anaconda installation program and view the installation instructions from here. Whether it is Windows, Linux or MAC OSX system, you can find the corresponding installation software. If your computer is 64-bit, try to choose the 64-bit version. As for whether the Python version is 2.7 or 3.x, it is recommended that you use Python3, because Python2 will eventually stop maintenance. Maybe most of the tutorials on the market currently use Python2, don't worry, because in Anaconda you can manage the environment of two Python versions at the same time.

Install according to the prompts. After completion, you may be surprised to find that there are many more applications in your computer. Don't worry, let's look at each item:

After the installation is complete, we also need to upgrade all toolkits to avoid possible errors. Open your computer's terminal and type in the command line:

conda upgrade --all

When the terminal asks whether to install the following upgrade version, enter y.

In some cases, you may encounter an error message that the conda command cannot be found. This is likely to be a problem with the environment path setting. You need to add the conda environment variable: export PATH=xxx/anaconda/bin:$PATH, where Replace xxx with the installation path of anaconda. At this point, the installation is complete, let's take a look at how to use Anaconda to manage the toolkit and environment.


Install a package:

conda install package_name

Here package_name is the name of the package to be installed. You can also install multiple packages at the same time. For example, to install numpy, scipy and pandas at the same time, execute the following command:

conda install numpy scipy pandas

You can also specify the version to install, such as installing version 1.1 of numpy:

conda install numpy=1.10

Remove a package:

conda remove package_name

Upgrade package version:

conda update package_name

View all packages:

conda list

If you can't remember the specific name of the package, you can also perform a fuzzy query:

conda  search search_term

Ubuntu installation#

  1. Official website download: https://www.continuum.io/downloads/, download python2 version or python3 version, 32-bit or 64-bit can also be selected according to your computer configuration.

  2. After downloading, the terminal enters the directory of the downloaded file.

If you downloaded the python3 version, run:

bash Anaconda3-4.3.0-Linux-x86_64.sh

  1. Choose yes during the installation process, especially the last step, ask whether to add the bin of anaconda to the user's environment variables, choose yes.

At this point, the installation is successful. Now open python and find it is the version of anaconda. Enter conda list in the terminal to view all installed tools.

Install Anaconda on Windows

  1. Go to Official Download Page to download. There are two versions to choose from: Python 3.6 and Python 2.7. After selecting the version, click "64-Bit Graphical Installer" or "32-Bit Graphical Installer" to download according to your operating system.

  2. After the download is complete, double-click the downloaded file to start the installer.

① If you encounter any problems during the installation process, temporarily close the anti-virus software and open it again after the installation procedure is completed.

② If you select "Install for all users" during installation, uninstall Anaconda and reinstall it, only for "me as a user".

  1. Select "Next".

  2. Read the terms of the license agreement, then check "I Agree" and proceed to the next step.

  3. Unless you are installing as an administrator for all users, just check "Just Me" and click "Next".

  4. In the "Choose Install Location" interface, select the target path to install Anaconda, and then click "Next".

Cannot contain space in the target path, and cannot be "unicode" encoding.

② Do not install as an administrator unless you are required to install with administrator rights.

image

  1. Do not check "Add Anaconda to my PATH environment variable." in "Advanced Installation Options" ("Add Anaconda to my environment variable."). Because if checked, it will affect the use of other programs. If you use Anaconda, you can use it by opening Anaconda Navigator or in "Anaconda Prompt" (similar to "Terminal" in macOS) in the start menu.

Unless you plan to use multiple versions of Anaconda or multiple versions of Python, check "Register Anaconda as my default Python 3.6".

Then click "Install" to start the installation. If you want to view the installation details, you can click "Show Details".

image

  1. Click "Next".

  2. Entering the "Thanks for installing Anaconda!" interface means that the installation is successful, click "Finish" to complete the installation.

image

  1. Verify the installation result. You can choose any of the following methods:

① "Start → Anaconda3 (64-bit) → Anaconda Navigator", if you can successfully start Anaconda Navigator, the installation is successful.

② "Start → Anaconda3 (64-bit) → right-click Anaconda Prompt → run as administrator", enter conda list in Anaconda Prompt, you can view the installed package name and version number. If the result can be displayed normally, the installation is successful.

Recommended Posts

Anaconda introduction and Ubuntu/windows installation Anaconda
Ubuntu introduction and installation
Python introduction and environment installation
Ubuntu18.04 installation Anaconda3 and VSCode guide
Python Anaconda installation
PyCUDA-Ubuntu 14.04 installation and testing
OpenMPI-Ubuntu installation and configuration
Centos mysql installation and configuration
Centos7 installation and configuration prometheus
CentOS 7 installation and configuration PPTP
Ubuntu16.04 installation and simple configuration
CentOS installation and configuration cmake
Centos7.5 installation and configuration MongoDB4.0.4
CentOS 7 installation and configuration PPTP
GitLab installation and basic use
centos7 kvm installation and use
CentOS7 postgresql installation and use
Introduction to CentOS7 installation process of openjdk, tomcat and mysql
Centos7 installation tomcat process introduction
Ubuntu PostgreSQL installation and configuration
Caffe-Ubuntu installation and problem solving
Centos7 elk7.1.1 installation and use
Ubuntu basic settings: introduction to the installation and use of openssh-server
Centos7 installation and configuration of Jenkins
Centos6.5 installation and deployment of KVM
Centos7 hadoop cluster installation and configuration
CentOS7 installation and maintenance of Gitlab
Python's exception concept introduction and handling
Redis installation under ubuntu and windows
Python's jieba module installation and download
CentOS 7.X system installation and optimization
Java-JDK installation and configuration under CentOS
CentOS 7 Tomcat service installation and configuration
Ubuntu 19.1 installation and configuration Chinese environment
CentOS NTP server installation and configuration
Configuration and beautification after Ubuntu installation (1)
Nginx installation and configuration load (ubuntu12.04)
CentOs7 installation and deployment Zabbix3.4 original
2-Kubernetes entry manual installation and deployment
Erlang 20.2 installation and deployment under CentOS 7
Ubuntu configuration source and installation software
JumpServer Bastion Host--CentOS 8 Installation and Deployment (4)
Centos7 mysql database installation and configuration