Interpreter like configuration pycharm

Transfer from: http: //www.360doc.com/content/18/0913/14/11881101_786350505.shtml

Why After installing python, also you need to configure the environment pycharm

Use our practical work python, often different projects will use Python versions and different versions of the same package, it is quite daunting problem of switching package management and different versions of Python. To solve these problems, there are many releases of Python, such as WinPython, Anaconda, these releases will python and many common package packed, easy to use Python users directly, in addition, there virtualenv, pyenv and other tools for managing virtual environments .

Python IDE development tools --pycharm uses two virtual environment management tools --virtualenv and conda.

Anaconda is a Python distribution for scientific computing. Anaconda using the Tools / command conda to package and environment management, and already contains Python and related supporting tools. Under explain conda, anaconda differences of these concepts. conda can be understood as a tool, but also an executable command, its core function is to package management and environmental management. Similarly using the package management and pip, environmental management allows the user to easily install different versions and can quickly switch python. Anaconda is a packaged set of pre-installed inside the conda, a version of python, a number of packages, scientific computing tools, etc., it is also described as a release of Python.

virtualenv  is a python can isolate multiple versions of the tool on the same computer. Sometimes, two different projects may require different versions of the python, such as python2.7 / python3.5, but if you have installed to a computer, often cause problems. So the need for a tool to be able to open these environmental isolation of two or more different versions, which version you need to switch to the version which version as the default. virtualenv not only meet this demand tool. It can be used to create stand-alone Python environment, multiple Python are independent of each other.

Background finished, described below pycharm used virtualen steps:

1, create a project Anconda_prj

Chapter III pycharm configuration python environment

 

2. Select projectinterpreter, you can select an existing, or create new ones.

If you choose to create a new interpreter, or may choose to use conda Vierualenv to create.

Chapter III pycharm configuration python environment

 

Chapter III pycharm configuration python environment

 

Name fill in the name of the new virtual environment, or use the default name, easy to install third-party packages and other items after use;

Fill in the new environment in the Location file directory;

Base interpreter in the drop-down box to select the Python interpreter;

Check Inherit global site-packages can use the base interpreter of third-party libraries, and will not vote completely isolated from the outside world;

Check the Make available to all projects can provide this virtual environment to another project.

Chapter III pycharm configuration python environment

 

Next we introduce the newly created Anconda_prj how to use, what features.

1, in pycharm, the position interperter load the library project are as follows. Its location is not the python installation directory (my python installed in c: \ directory under Programspython)

Chapter III pycharm configuration python environment

 

Chapter III pycharm configuration python environment

 

2, after the CMD command line use pip install lib library, and does not automatically added to the above virtual library, virtual lib management tools need to perform directory pipinstall again, the installation or use pycharm

Chapter III pycharm configuration python environment

Guess you like

Origin www.cnblogs.com/Li-JT/p/12186564.html