简体   繁体   中英

Anaconda - updating packages in a specific virtual environment

I have Python 3.x installed as my root Anaconda environment. I also have the Intel Distribution for Python installed as a virtual environment. When I do conda update --all , in either environment it only looks for the main Conda packages to update. If I instead first set conda config --add channels intel , it'll search for the Intel-related packages when I update packages in either environment. However, I only want it to update the Intel packages in the Intel environment whereas I don't want it to update to the Intel variants in my root environment.

How can I update all my packages in a given environment in this way?

You can force conda to only look in the appropriate channel when updating.

# In the root env
conda update -c defaults --override-channels --all
# In the Intel env
conda update -c intel --override-channels --all

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