conda environments
时间: 2023-09-10 11:10:46 浏览: 101
Conda environments are isolated virtual environments created using the Conda package manager. They allow you to create and manage different versions of Python and different sets of packages, without interfering with each other or with the system Python installation.
Each Conda environment has its own set of installed packages and its own Python interpreter. This means that you can have multiple environments with different versions of Python and different sets of packages installed in each. You can switch between environments easily, and you can share your environment configuration with others so they can easily replicate your environment.
To create a new Conda environment, you can use the `conda create` command, specifying the Python version and any packages you want to install. For example, to create a new environment called "myenv" with Python 3.8 and the numpy package, you would run:
```
conda create --name myenv python=3.8 numpy
```
Once you've created an environment, you can activate it using the `conda activate` command:
```
conda activate myenv
```
This will activate the "myenv" environment and set it as the default Python environment for your terminal session. You can then install additional packages using the `conda install` command, and run Python scripts or Jupyter notebooks using the Python interpreter and packages installed in that environment.
To switch back to your default Python environment, you can use the `conda deactivate` command. You can also list all of your existing environments using the `conda env list` command.
阅读全文