Home >Backend Development >Python Tutorial >How to create a new virtual environment in conda
## Operating system for this tutorial: Windows 10 system, Python 3.11.4 version. Dell G3 computer.Method to create a new virtual environment: 1. Use “conda create --name your_env_name " command to create a new virtual environment in Conda; 2. Create a virtual environment named myenv, you can run the "conda create --name myenv" command; 3. Create a virtual environment named myenv and install it in it Python 3.8 version, you can add python=3.8 after the two methods command
Everyone is watching recently
[shoudongurl]How to switch conda environments[/shoudongurl]
[shoudongurl]How to install tensorflow in conda[/shoudongurl]
[shoudongurl]How to delete the environment in conda[/shoudongurl]
[shoudongurl]How to view the environment in conda[/shoudongurl]
You can use the following command to create a new virtual environment in Conda:conda create --name your_env_nameIn this command, your_env_name is the value you want The name to give the virtual environment. For example, if you want to create a virtual environment named myenv, you can run the following command:
conda create --name myenvYou can also specify a specific version to install in the new environment. Python. For example, to create a virtual environment named myenv and install the Python 3.8 version in it, you can run the following command:
conda create --name myenv python=3.8After creating the virtual environment, you can activate the environment and install all required package. To activate the virtual environment, you can use the following command: On Windows:
activate myenvOn macOS and Linux:
source activate myenv
The above is the detailed content of How to create a new virtual environment in conda. For more information, please follow other related articles on the PHP Chinese website!