anaconda--Scientific computing for Python distributions

Source: Internet
Author: User

"Background" Python is easy to use, but it's a headache for package management and Python versions, especially when you're using Windows. To address these issues, there are a number of distributions of Python, such as Winpython, Anaconda, and so on, which pack Python and many of the most popular packages to facilitate direct use of the "overview"

Anaconda is a Python release for scientific computing that supports Linux, MAC, Windows, and provides package management and environmental management capabilities that can easily resolve multiple versions of Python coexistence, switching, and various third-party package installation issues. Anaconda uses tools/commands conda to manage package and environment, and it already contains Python and related companion tools.

  Anaconda则是一个打包的集合,里面预装好了conda、某个版本的python、众多packages、科学计算工具等等,所以也称为Python的一种发行版。  

  condaCan be understood as a tool, is also an executable command, its core function is package management and Environmental management . Package management is similar to the use of PIP, and environmental management allows users to easily install different versions of Python and switch quickly. Conda treats almost all of its tools and third-party packages as a package, even Python and Conda itself!

Download

Recommended to use the domestic Tsinghua station download, fast https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/

 

Installation

Anaconda comes with Python, if you have previously installed Python, it is recommended that you uninstall previously installed Python and remove the python environment variables, such as C:\Python3\ and C:\Python3\Scripts\

Anaconda installation of the next fool installation, it is recommended to tick the add path to the environment variable. If you forget to tick, add the following path to the PATH environment variable manually:

C:\programdata\anaconda3c:\programdata\anaconda3\scriptsc:\programdata\anaconda3\library\binc:\programdata\ Anaconda3\library\mingw-w64\binc:\programdata\anaconda3\library\usr\bin

After you have configured path, you can check the Conda version and the Python version by command.

Conda--version
Python--version

  

"Set up a domestic mirror"

If you need to install a lot of packages, you will find that Conda download is often very slow, because anaconda.org server is abroad. Fortunately, the Tsinghua tuna image source has a anaconda warehouse image, we add it to the Conda configuration:

--add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/--set show_channel_urls Yes

"Environmental Management"

Conda's environmental management capabilities allow us to install several different versions of Python at the same time and switch freely. For the installation process described above, if we are using a Python 2.7 corresponding to the installation package, then Python 2.7 is the default environment (the default name is root). Suppose we need to install Python 3.4, at this point we need to do the following:

# Create an environment named Python34, specify that the Python version is 3.4 (regardless of whether 3.4.x,conda will automatically find the latest version in 3.4.x for us) Conda create--name python34 python=3.4# at this time, Enter the Python--version# again to get ' python 3.4.5:: Anaconda 4.1.1 (64-bit) ', i.e. the system has switched to the 3.4 environment # if you want to return to the default Python 2.7 environment, run deactivate PYTHON34 # for Windowssource deactivate Python34 # for Linux & mac# Remove an existing environment Conda remove--name python34--all# after installation, Activating an environment using activate activate PYTHON34 # for Windowssource activate Python34 # for Linux & mac# When activated, you'll find terminal input more places Pytho N34, in fact, what the system does now is to remove the default 2.7 environment from path, and then add 3.4 corresponding commands to the path

Conda info-e #查看当前Environment, different user-installed Python environments will be placed in the directory ~/anaconda/envs

  

"Common Commands"
--n python34 numpy# if no -n Specifies the environment name, it is installed in the current active environment # can also be passed ---n python34 numpy

# update Conda, keep Conda up to date
Conda Update Conda

# Update Anaconda
Conda Update Anaconda

# Update Python
Conda Update python
# Assuming the current environment is Python 3.4, Conda will upgrade Python to the current latest version of the 3.4.x series

anaconda--Scientific computing for Python distributions

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.