简体   繁体   中英

how to create conda environment from within Miniconda

I have Anaconda3 (Python 3.7) install on my MacOS. For specific project, I installed Miniconda3 (Python 3.6). I would like to install packages with Miniconda but whenever I create new conda environment, it installs it within the Anaconda3 and uses python 3.7. How can i change this?

The package manager in Anaconda and Miniconda are identical (Conda), so there is no need install Miniconda in your system if you intend to keep Anaconda. Creating envs with

conda create -n myenv python some_packages

will have the same result either way with the exception that they maintain different package caches - hence you only have a downside by installing both. Remove one, and you probably also need to clean up your shell initialization script (eg, .bash_profile ), since the installers edit this.

You can use the following command:

conda create -n new_env python=3.6

https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM