首页 > 编程 > Python > 正文

anaconda中环境下安装python包

2019-11-08 00:51:45
字体:
来源:转载
供稿:网友

使用conda

conda install xx 包名存在的问题:速度慢。 conda的源在国外,翻不了墙的话很慢。在网上查了一下可以换清华的镜像,但我试了下貌似没用。贴出来方法。conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/conda config --set show_channel_urls yes

或者直接vi ~/.condarc,输入以下内容

channels: - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ - defaultsshow_channel_urls: yes缺少包 可能有些包conda中没有。这时可以用anaconda中的pip来安装(区别于系统的pip)到anaconda中 sudo /anaconda2/bin/pip install xx 速度慢的问题也解决了,可能是因为我的pip源是国内的吧,不是很清楚。
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表