Python Scientific computing environment recommended--anaconda_python

Source: Internet
Author: User
Tags virtual environment virtualenv

Anaconda is a scientific computing environment similar to canopy, but it is more convenient to use. The package manager with Conda is also very powerful.

The first is to download the installation. Anaconda provides two versions of Python2.7 and Python3.4, and can be created by Conda if other versions are required. When the installation is complete, you can see that Anaconda provides Spyder,ipython and a command line. Let's take a look at Conda.

Enter the Conda list to see all the Python extensions that come with the installation. A cursory glance, including the commonly used NumPy, scipy, Matplotlib and Networkx, as well as beautiful-soup, requests, flask, Tornado and other network-related extensions.

Strangely, there is no sklearn inside, so first load it.

Conda Install Scikit-learn
If you need to specify a version, you can also specify it directly with [package-name]=x.x.

Conda's repo extension is not too new, if you want to update, you may want to use PyPI or download the source code. The Conda and Pip are very well connected. Things that are installed with PIP can be managed using Conda, which is better than canopy. The following figure is the NLTK, Jieba, and Gensim that I installed with PIP.

Another requirement of my scientific computing environment is the ability to coexist with multiple Python versions, especially 2.x and 3.x. This can be done through virtualenv. Anaconda is also through its realization.

Below, create an environment named Python2 with the Conda version of python2.7.

Conda create-n Python2 python=2.7
This will create the Python2 directory under the Envs directory under the Anaconda installation directory.

To install an extension to it, you can:

Directly with Conda install and using-N to indicate the installed environment, this is naturally python2.
Like Virtualenv, first activate, then install in the virtual environment.
There is a sudden problem here, how to use the created environment in the IDE? If the IDE is Pycharm, set the Python installation directory directly. What about the Spyder? In fact, Spyder is an extension of Python, you need to install a Spyder in the virtual environment.

The final is the Spyder main interface. Variable viewing window works fine.

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.