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
1
chenguoyu OP 把 http 改成 https 也没用啊
|
2
gkiwi 2016-11-30 10:56:38 +08:00
pip install requests --trusted-host pypi.doubanio.com 试试
|
3
neoblackcap 2016-11-30 11:00:42 +08:00 2
换清华的源试试
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package |
4
q397064399 2016-11-30 11:13:28 +08:00
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'.
好好把这段给鸡翻一下,你看是不是 pip 跟 python 版本不对应 |
5
chenguoyu OP @neoblackcap
@gkiwi Command "python setup.py egg_info" failed with error code 1 in C:\Users\cgy\AppData\Local\Temp\pip-build-wwuh4pnj\cffi\ 这是怎么回事呢? |
6
chenguoyu OP @q397064399 我 pip 的版本是最新的 9.01 ,应该不会吧
|
7
lrh3321 2016-11-30 11:19:31 +08:00
windows 下安装库?
你安装了 Microsoft Visual C++ Compiler for Python 2.7 或者 Microsoft Visual C++ Compiler for Python 3.4 了吗 |
8
mansur 2016-11-30 11:22:44 +08:00
|
9
LeGendAI 2016-11-30 11:28:18 +08:00
你是不是还装了 Python2.x 版,可能是用了 2.x 对应的 pip
|
13
lrh3321 2016-11-30 11:51:53 +08:00
@chenguoyu https://www.microsoft.com/en-us/download/details.aspx?id=44266 2.7 的
3.x 版本的话,我是直接装了 VS 2015. 你试试 Visual C++ Build Tools http://landinghub.visualstudio.com/visual-cpp-build-tools 有没有用吧 |
14
chunk 2016-11-30 11:58:30 +08:00
最近 pypi 源抽风
|
15
SlipStupig 2016-11-30 13:19:30 +08:00
跟 VC 和 PIP 版本都没关系就是个参数问题, pip install --index-url http://pypi.doubanio.com/simple/ requests --trusted-host pypi.doubanio.com , 需要用这个参数“-trusted-host pypi.doubanio.com ”,否则为不信任源
|
16
yunfengjiang 2016-11-30 13:24:38 +08:00
命令后加上--trusted-host pypi.doubanio.com 这个参数 pip install --index-url http://pypi.doubanio.com/simple/ requests --trusted-host pypi.doubanio.com
|
17
chenguoyu OP @LeGendAI
pip 9.0.1 from C:\Users\cgy\AppData\Roaming\Python\Python36\site-packages (python 3.6) 没有问题呀 |
18
chenguoyu OP Command "c:\python\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\cgy\\AppData\\Local\\Temp\\pip-build-clugysos\\numpy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.rea
d().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\cgy\AppData\Local\Temp\pip-_hf3fge5-record\install-record.txt --single-version-externally-managed --compile" fai led with error code 1 in C:\Users\cgy\AppData\Local\Temp\pip-build-clugysos\numpy\ 这是什么问题啊 |
19
misaka19000 2016-11-30 15:43:24 +08:00
给了管理员权限了吗
|
20
chenguoyu OP @misaka19000 给了,但是没用啊。而且一般是不用给管理员权限的吧
|
21
chenguoyu OP 现在换成清华的镜像是可以的,可是报了个新的错
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2 好像是编译器的问题,但是还是无法解决 |
22
xucuncicero 2016-11-30 16:31:13 +08:00
@chenguoyu set STATICBUILD=true && pip install XXX
|
23
billgreen1 2016-11-30 16:55:46 +08:00 via iPhone
Windows 上,编译会经常有问题。可以尝试使用 anaconda 或者,国外有个.edu 的网站,有已经编译好的
|
24
ap010gi2e 2016-11-30 22:44:25 +08:00
一般这个时候我会检查我的 pip 版本是不是最新版。我一般出现是在初始化 virtualenv 的时候,那时候 pip 的版本不是最新的,可试试。
|
25
mingyun 2016-12-01 00:08:12 +08:00
python 在 windows 安装库很蛋疼
8 楼比较靠谱,不过也不一定成功 |
26
chenguoyu OP |