Note that this command are measured using the Anaconda Prompt, not cmd command line is not recommended to use the latter.
Information Display
- info Conda
Conda detailed information
note, the above figure python version does not refer to the current environment python version, but the version of the base environment, want to see the current environment python version, python --version can direct (conda can also enter the command line Python). - conda -V
Displays the current conda version, you can also use conda --version
- conda list
view under the current environment of all installed packages
- conda env list
displays all current environmental information conda has been created:
BTW, next Anaconda Prompt, every front-line command will prompt name of the current environment, conda env list will be marked with an asterisk current environment:
Python environmental management
- Creation Environment
conda create -n NAME python=3.5
NAME is the name of the custom of the environment, on both sides of the equal sign without spaces
practical operation:
Success:
- Switching environment
conda activate NAME
- Exit the environment
conda deactivate
conda deactivate will be returned to the base environment
- Delete the environment
conda remove -n NAME --all
After the operation is over:
conda Management Pack
- View all packages
conda list
- Installation package
conda install PACKAGE_NAME
Of course, you can also install a specific version of the package:
conda install PACKAGE_NAME=version_no # version_no是版本号,只有一个等号
- Upgrade package
conda update PACKAGE_NAME
- Delete Package
python remove PACKAGE_NAME
pip and conda command comparison
command | pip | conda |
---|---|---|
View package | pip list | Conda list |
installation | pip install package_name | conda install package_name |
Installation (specific version) | pip install package_name==ver_no | conda install package_name=ver_no |
upgrade | pip install --upgrade package_name | conda update package_name |
delete | pip uninstall package_name | conda remove package_name |
The following points are noteworthy:
- pip will download the specified package, conda will download the specified package dependencies, accordingly, will be deleted when you delete conda corresponding dependencies
- When the version number of the specified install, pip by "==", conda by "="
- When you upgrade, pip use install --upgrade, conda using update
- When delete, pip use pip uninstall, conda use pip remove
About pip basic introduction to see my other article: use pip install the package
on the difference between pip and conda, you can see my other article: Python, pip, conda and Anaconda
Department of the original article, please indicate the source. Inadequate welcome comment explore, like you can point a praise oh.