Article Directory
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:
- linux user may need to enter the
anaconda/envs
environment activates the required directory; - 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
bin
add a file to the global environment variable. As will be/home/yourName/anaconda3/envs/yourEnv/bin
added to the~/.bash_profile
medium.
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