我在mac上使用brew
安装python并在~/.pip/pip.conf
中添加配置文件
[global]
index-url=http://mirrors.aliyun.com/pypi/simple
[install]
trusted-host=http://mirrors.aliyun.com
但它不起作用。当点击命令pip install PIL
时,它会抱怨:
Collecting PIL
The repository located at mirrors.aliyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with '--trusted-host mirrors.aliyun.com'.
Could not find a version that satisfies the requirement PIL (from versions: )
No matching distribution found for PIL
请建议。
答案 0 :(得分:1)
您需要做的就是将存储库标记为此次运行的pip:
pip install PIL --trusted-host mirrors.aliyun.com