conda create a new environment

conda create a new environment

If you just use it, use [] and [create] activation command enough ~

Step 1: Create

conda create --name yourEnv python=2.7

  • -Name : can be abbreviated to [-n], [yourEnv] is the name of the newly created virtual environment, you have created, find envs / yourEnv directory under the directory can be installed anaconda
  • 2.7 = python : python is the version number. Can also be specified as [python = 3.6], if not specified, the default version is loaded when the python anaconda.

If you want to install some packages python while creating the environment:
conda create -n yourEnv python=3.6 numpy pandas

Step two: Activate

windows ==> activate yourEnv
linux/mac ==> source activate yourEnv

tips:

  1. linux user may need to enter the anaconda/envsenvironment activates the required directory;
  2. If you do not want every time linux user to the directory activated, the need for a global environment variable settings will need to be activated in the path to binadd a file to the global environment variable. As will be /home/yourName/anaconda3/envs/yourEnv/binadded to the ~/.bash_profilemedium.

The third step: View active environment

conda info --envs: Output with [*] is the number of the current environment in which

Some commands conda

conda list: Look at this package and installed at ambient version
conda install numpy scikit-learn: Install numpy sklearn package
conda env remove -n yourEnv: Delete your environment

reference

Finished found that more than can reference this , including the installation anaconda, but the download address can be changed:
Tsinghua open source image
conda official document
Anaconda official documents

Guess you like

Origin blog.csdn.net/SARACH_WONG/article/details/89328307