`virtualenv
pip3 install virtualenv
mac :virtualenv {环境名称} --python=python {版本}
win:virtualenv.exe {环境名称} --python=python {版本}
激活
mac:source activate
win:activate.exe
退出
mac:deactivate
win:deactivate.bat
miniconda
Miniconda — conda documentation
创建虚拟环境
conda create -n Test1 python=3.8.3
虚拟环境列表
conda env list
激活环境
conda activate Test1
退出环境
conda deactivate
删除环境
conda env remove -n Test1
帮助命令
usage: conda-script.py [-h] [-V] command ...
conda is a tool for managing and deploying applications, environments and packages.
Options:
positional arguments:
command
clean Remove unused packages and caches.
compare Compare packages between conda environments.
config Modify configuration values in .condarc. This is modeled after the git config command. Writes to the
user .condarc file (C:\Users\1\.condarc) by default.
create Create a new conda environment from a list of specified packages.
info Display information about current conda install.
init Initialize conda for shell interaction.
install Installs a list of packages into a specified conda environment.
list List linked packages in a conda environment.
package Low-level conda package utility. (EXPERIMENTAL)
remove Remove a list of packages from a specified conda environment.
rename Renames an existing environment
run Run an executable in a conda environment.
search Search for packages and display associated information. The input is a MatchSpec, a query language
for conda packages. See examples below.
uninstall Alias for conda remove.
update Updates conda packages to the latest compatible version.
upgrade Alias for conda update.
notices Retrieves latest channel notifications.
optional arguments:
-h, --help Show this help message and exit.
-V, --version Show the conda version number and exit.
conda commands available from other packages:
content-trust
env