简体   繁体   中英

How to add a package to a new Anaconda environment?

I have installed the pygal package through the following command line:

conda install -c akode pygal

However, when I search this package in the Anaconda, I can only find this package in the base (root) environment. When I try to search this pygal package in my newly created environment, nothing can I find.

Why does this happen? and is there any solution to this problem?

在此处输入图片说明 在此处输入图片说明

When you are not in an environment and run conda install , it will install it in the base. If you activate your environment then install the package using conda install, it will apply to your environment.

source activate data_visualization_coursera
conda install -c akode pygal

Or you can install a specific package to an environment using this command

conda install -n <environment_name> <package_name>

You can find all of the documentation here https://conda.io/docs/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