conda在指定环境下安装包

有两个方法可以实现:

方法一:

conda install -n 环境名 包名

举个例子,在名字为test_env的环境中安装tensorflow

xxxx$ conda install -n test_env tensorflow

方法二:

进入环境,在环境里用conda安装

举个例子,在名字为test_env的环境中安装tensorflow

先进名字为test_env的环境中

XXXX$ source activate test_env

再安装tensorflow

(test_env)xxxx$ conda install tensorflow
发布了54 篇原创文章 · 获赞 80 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/qq_41685265/article/details/104680845