Closed
Description
- Pip version:9.0.1
- Python version:2.7.11 :: Anaconda 4.0.0(64-bit)
- Operating system:linux 3.10.0-514.21.1.el7.x86_64
Description:
I use devpi as pypi mirror on my machine. when I use pip install some package with -i parameter, it works well with install_requires
in setup.py, but not work with setup_requires
. It use https://pypi.python.org/simple/, instead of use index-url I expect in -i parameter
my machine can't connect to Internet
What I've run:
pip install -i http://devpi.xxx.cn/root/xxx/+simple/ --trusted-host devpi.xxx.cn requests-unixsocket==0.1.5
Collecting requests-unixsocket==0.1.5
Downloading http://devpi.xxx.cn/root/pypi/+f/084/53c8ef7dc0386/requests-unixsocket-0.1.5.tar.gz
Complete output from command python setup.py egg_info:
Download error on https://pypi.python.org/simple/pbr/: [Errno 101] Network is unreachable -- Some packages may not be found!
Couldn't find index page for 'pbr' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: [Errno 101] Network is unreachable -- Some packages may not be found!
No local packages or download links found for pbr
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-HcqADp/requests-unixsocket/setup.py", line 7, in <module>
pbr=True,
File "/home/work/anaconda2/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/home/work/anaconda2/lib/python2.7/site-packages/setuptools-20.3-py2.7.egg/setuptools/dist.py", line 269, in __init__
File "/home/work/anaconda2/lib/python2.7/site-packages/setuptools-20.3-py2.7.egg/setuptools/dist.py", line 313, in fetch_build_eggs
File "/home/work/anaconda2/lib/python2.7/site-packages/setuptools-20.3-py2.7.egg/pkg_resources/__init__.py", line 827, in resolve
File "/home/work/anaconda2/lib/python2.7/site-packages/setuptools-20.3-py2.7.egg/pkg_resources/__init__.py", line 1072, in best_match
File "/home/work/anaconda2/lib/python2.7/site-packages/setuptools-20.3-py2.7.egg/pkg_resources/__init__.py", line 1084, in obtain
File "/home/work/anaconda2/lib/python2.7/site-packages/setuptools-20.3-py2.7.egg/setuptools/dist.py", line 380, in fetch_build_egg
File "/home/work/anaconda2/lib/python2.7/site-packages/setuptools-20.3-py2.7.egg/setuptools/command/easy_install.py", line 634, in easy_install
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('pbr')
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-HcqADp/requests-unixsocket/
I also run
pip install -i http://devpi.xxx.cn/root/xxx/+simple/ --trusted-host devpi.xxx.cn pbr
Collecting pbr
Downloading http://devpi.xxx.cn/root/pypi/+f/75a/0f55856bfc922/pbr-3.1.1-py2.py3-none-any.whl (99kB)
100% |████████████████████████████████| 102kB 46.1MB/s
Installing collected packages: pbr
Successfully installed pbr-3.1.1
requests-unixsocket setup.py
#!/usr/bin/env python
from setuptools import setup
setup(
setup_requires=['pbr'],
pbr=True,
)