为什么我用 pycharm 安装第三方库老是失败啊,也百度了很多,没找到啊

2016-11-30 10:33:33 +08:00
 chenguoyu

pip install --index-url http://pypi.doubanio.com/simple/ requests

Non-zero exit code (1)

Try to run this command from the system terminal. Make sure that you use the correct version of 'pip' installed for your Python interpreter located at 'C:\Python\Python36\python.exe'.

Collecting requests

The repository located at pypi.doubanio.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 pypi.doubanio.com'. Could not find a version that satisfies the requirement requests (from versions: ) No matching distribution found for requests

63517 次点击
所在节点    Python
26 条回复
chenguoyu
2016-11-30 16:16:37 +08:00
现在换成清华的镜像是可以的,可是报了个新的错
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
好像是编译器的问题,但是还是无法解决
xucuncicero
2016-11-30 16:31:13 +08:00
@chenguoyu set STATICBUILD=true && pip install XXX
billgreen1
2016-11-30 16:55:46 +08:00
Windows 上,编译会经常有问题。可以尝试使用 anaconda 或者,国外有个.edu 的网站,有已经编译好的
ap010gi2e
2016-11-30 22:44:25 +08:00
一般这个时候我会检查我的 pip 版本是不是最新版。我一般出现是在初始化 virtualenv 的时候,那时候 pip 的版本不是最新的,可试试。
mingyun
2016-12-01 00:08:12 +08:00
python 在 windows 安装库很蛋疼
8 楼比较靠谱,不过也不一定成功
chenguoyu
2016-12-01 09:02:25 +08:00
@ap010gi2e
@mingyun
是最新的啊,我现在报 vs2014 目录下的 cl.exe 找不到 msdia140.dll ,可是明明有啊

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/324279

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX