如何在osx上配置PIP,使用brew安装



我在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

请建议。

您所需要做的就是为这次运行的pip将存储库标记为受信任:

pip install PIL --trusted-host mirrors.aliyun.com

最新更新