简体   繁体   中英

In Anaconda, How to install packages in NON-ROOT environment?

I am using my own environment called datascience in anaconda. When I found that I need the Geopandas package and installed it using conda install, the Geopandas package was installed in the "root environment". Is there any way to install packages directly to the environment or copying from the root environment to another?

Thanks!

See the documentation for the conda install command: https://conda.io/docs/commands/conda-install.html and the tutorial on managing packages: https://conda.io/docs/using/pkgs.html#install-a-package

In short, you can specify the environment to install to in the install command

conda install -n env-name package-name

or you can activate the environment, then install

conda activate env-name
conda install package-name

You can also achieve this by Anaconda GUI.

  1. Go to environments tab.

  2. select your preferred environment Right click and open in cmd .

  3. Then install geopandas package from cmd window.

This way you will be isolating your package installation from root environment.

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