Virtual environment in anaconda under windows (create configuration to use virtual environment)

  • First, find and enter the anaconda directory.

  • Create a virtual environment

    conda create -n your_env_name python=x.x

  • View the existing and activated environment (the environment name with * is activated)

    conda env list

    conda info -e

  • Activate and enter the environment you created

    activate your_env_name

  • View packages already in the environment

    pip list

  • Install the package in the environment

    pip install backage (into the environment)

    conda install -n your_env_name backage (under the anaconda directory)

  • Delete the package in the environment

    pip uninstall backage (into the environment)

    conda remove -n your_env_name backage (if you report an error, you can only choose the previous method)

  • Exit the current environment

    conda deactivate

    activate root

  • Delete existing environment

    conda remove -n your_env_name --all

Guess you like

Origin blog.csdn.net/qq_42546127/article/details/114834752