![]() You can use conda list - revision to check again. (project-env) username ~ % conda install -revision 1 # Package Plan # environment location: /Users/username/opt/anaconda3/envs/project-env added / updated specs: - configparser - numpy - python=3.7 The following packages will be REMOVED: configparser-3.5.0-p圓7_0Ĭonfigparser has been removed successfully. Revision history allows you to rollback your environment to the previous version just like that. Imagine you accidentally screw up your dependencies just because you update/install a new package. It is an incredibly useful feature to have to manage your package in the environment. Ĭonda list also supports revision history. (project-env) username ~ % conda list # packages in environment at /Users/username/opt/anaconda3/envs/project-env: # Name Version Build Channel ca-certificates 2020.1.1 0 pip 20.0.2 p圓7_1 python 3.7.6 h359304d_2 readline 7.0 h1de35cc_5 setuptools 45.1.0 p圓7_0. You can use conda list to display all packages in this environment. The (project-env) indicates the current active environment. (base) username % conda activate project-env (project-env) username % Activate your new environmentĪs you can see, you have successfully create your new Python environment. (base) username % conda create -prefix /path/project-env 4. Conda can no longer find your environment by your environment name, you will have to specify the environment’s full path to activate it every time. You may change the default location by using the following command but it is not encouraged. The environments created by Conda is always located in /Users/./anaconda3/envs/. (base) username % conda env list # conda environments: # base * /Users/username/opt/anaconda3 project-env /Users/username/opt/anaconda3/envs/project-env py2 /Users/username/opt/anaconda3/envs/py2 We can also specify the Python version when creating the environment.Īfter creating your new environment, you can run conda env list to check your new environment. ![]() Let’s say you want to create a virtual environment for your new project, we can use conda create to create a new environment named project-env. Create a new environment (base) username % conda create -name project-env python=3.7 py2 is my another virtual environment for my Python 2 projects. base is always the default active environment when you open your terminal. The * will point to the current active environment. ![]() We can use conda env list to list all existing Python environments. List all existing environments (base) username % conda env list # conda environments: # base * /Users/username/opt/anaconda3 py2 /Users/username/opt/anaconda3/envs/py2 Anaconda Prompt on Windows showing conda info 2.
0 Comments
Leave a Reply. |