Ubuntu conda虚拟环境下pip换源
一、检查输出是否包含配置项
pip config list
如果看不到pip源URL,说明没有配置。
二、详细查看配置加载路径
pip config list -v (py3.6-rknn-1.7.5) neko@ubuntu:~/rv1126/rknn_trans$ pip config list -v
For variant 'global', will try loading '/etc/xdg/xdg-ubuntu/pip/pip.conf'
For variant 'global', will try loading '/etc/xdg/pip/pip.conf'
For variant 'global', will try loading '/etc/pip.conf'
For variant 'user', will try loading '/home/neko/.pip/pip.conf'
For variant 'user', will try loading '/home/neko/.config/pip/pip.conf'
For variant 'site', will try loading '/home/neko/miniconda3/envs/py3.6-rknn-1.7.5/pip.conf'
三、编辑pip配置文件
编辑虚拟环境下pip配置文件,如果没有则新建。
vim /home/neko/miniconda3/envs/py3.6-rknn-1.7.5/pip.conf
阿里源(复制粘贴),wq保存即可。
[global]
#timeout = 1000
index-url = https://mirrors.aliyun.com/pypi/simple/
extra-index-url = https://www.piwheels.org/simple/
[install]
use-mirrors =true
mirrors =https://mirrors.aliyun.com/pypi/simple/
trusted-host =mirrors.aliyun.com