Home > Backend Development > Python Tutorial > How to create a new virtual environment in conda

How to create a new virtual environment in conda

小老鼠
Release: 2024-04-23 15:09:21
Original
5947 people have browsed it

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

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.

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_name
Copy after login
In 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 myenv
Copy after login
You 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.8
Copy after login
After 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 myenv
Copy after login
On macOS and Linux:

source activate myenv
Copy after login

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!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template