2018-03-31

(1)使用命令:sudo pip install numpy时,可能遇到:

The directory '/Users/huangqizhi/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

说得很清楚,是pip目录的属主不是sudo的root用户。如果必须用sudo pip,更改pip目录属主即可:

sudo chown root /Users/huangqizhi/Library/Caches/pip

sudo chown root /Users/peiyilin/Library/Caches/pip/http

我忘记带不带最后的http了**(我加粗了)

(2)pip安装时,可能遇到:

/Library/Python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.

  InsecurePlatformWarning

解决方法:安装requests,注意后面带[security]:

pip install requests[security]

这一步是先进性,解除requests,再进行安装

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容