Error installing Bottleneck 1.2.0 from behind proxy
See original GitHub issueI just ran into an error where some unit tests are failing after upgrading from 1.1.0 to 1.2.0. This is on a work-hosted GitLab instance that’s behind a proxy. Here’s my virtual environment:
amqp==1.4.9
anyjson==0.3.3
autopep8==1.2.4
billiard==3.5.0.1
Bottleneck==1.2.0
celery==3.1.24
colormath==2.1.1
decorator==4.0.10
Django==1.9.11
django-celery==3.1.17
django-debug-toolbar==1.5
django-extensions==1.7.4
django-filter==0.15.3
django-nested-admin==3.0.12
django-widget-tweaks==1.4.1
djangorestframework==3.5.2
factory-boy==2.7.0
fake-factory==0.7.2
isodate==0.5.4
isort==4.2.5
kombu==3.0.35
Markdown==2.6.7
networkx==1.11
numexpr==2.6.1
numpy==1.11.2
pandas==0.19.0
pep8==1.7.0
psycopg2==2.6.2
py==1.4.31
pyflakes==1.3.0
pyHarmonySearch==1.3.3
pylibmc==1.5.1
pyshp==1.2.10
pytest==3.0.3
pytest-django==3.0.0
python-dateutil==2.5.3
python-monkey-business==1.0.0
pytz==2016.7
requests==2.11.1
scipy==0.18.1
six==1.10.0
spectra==0.0.7
sqlparse==0.2.2
vine==1.1.3
whitenoise==3.2.2
xlrd==1.0.0
Here’s the output of my CI output attempting to install 1.2.0:
...
...
...
$ python3 -m venv env
$ source env/bin/activate
$ pip --proxy $HTTP_PROXY install --upgrade pip
Collecting pip
Downloading pip-8.1.2-py2.py3-none-any.whl (1.2MB)
Installing collected packages: pip
Found existing installation: pip 8.1.1
Uninstalling pip-8.1.1:
Successfully uninstalled pip-8.1.1
Successfully installed pip-8.1.2
$ pip --proxy $HTTP_PROXY install -r requirements.txt
Collecting amqp==1.4.9 (from -r requirements.txt (line 1))
Downloading amqp-1.4.9-py2.py3-none-any.whl (51kB)
Collecting anyjson==0.3.3 (from -r requirements.txt (line 2))
Downloading anyjson-0.3.3.tar.gz
Collecting autopep8==1.2.4 (from -r requirements.txt (line 3))
Downloading autopep8-1.2.4-py2.py3-none-any.whl (41kB)
Collecting billiard==3.5.0.1 (from -r requirements.txt (line 4))
Downloading billiard-3.5.0.1.tar.gz (156kB)
Collecting Bottleneck==1.2.0 (from -r requirements.txt (line 5))
Downloading Bottleneck-1.2.0.tar.gz (92kB)
Complete output from command python setup.py egg_info:
Download error on https://pypi.python.org/simple/numpy/: [Errno 101] Network is unreachable -- Some packages may not be found!
Couldn't find index page for 'numpy' (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 numpy
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-2vzimtgq/Bottleneck/setup.py", line 109, in <module>
setup(**metadata)
File "/usr/local/lib/python3.4/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/builds/bsv/swap/env/lib/python3.4/site-packages/setuptools/dist.py", line 269, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/builds/bsv/swap/env/lib/python3.4/site-packages/setuptools/dist.py", line 313, in fetch_build_eggs
replace_conflicting=True,
File "/builds/bsv/swap/env/lib/python3.4/site-packages/pkg_resources/__init__.py", line 826, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/builds/bsv/swap/env/lib/python3.4/site-packages/pkg_resources/__init__.py", line 1092, in best_match
return self.obtain(req, installer)
File "/builds/bsv/swap/env/lib/python3.4/site-packages/pkg_resources/__init__.py", line 1104, in obtain
return installer(requirement)
File "/builds/bsv/swap/env/lib/python3.4/site-packages/setuptools/dist.py", line 380, in fetch_build_egg
return cmd.easy_install(req)
File "/builds/bsv/swap/env/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 634, in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('numpy')
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-2vzimtgq/Bottleneck/
ERROR: Build failed: exit code 1
And if I use 1.1.0, it succeeds:
...
...
...
$ python3 -m venv env
$ source env/bin/activate
$ pip --proxy $HTTP_PROXY install --upgrade pip
Collecting pip
Downloading pip-8.1.2-py2.py3-none-any.whl (1.2MB)
Installing collected packages: pip
Found existing installation: pip 8.1.1
Uninstalling pip-8.1.1:
Successfully uninstalled pip-8.1.1
Successfully installed pip-8.1.2
$ pip --proxy $HTTP_PROXY install -r requirements.txt
Collecting amqp==1.4.9 (from -r requirements.txt (line 1))
Downloading amqp-1.4.9-py2.py3-none-any.whl (51kB)
Collecting anyjson==0.3.3 (from -r requirements.txt (line 2))
Downloading anyjson-0.3.3.tar.gz
Collecting autopep8==1.2.4 (from -r requirements.txt (line 3))
Downloading autopep8-1.2.4-py2.py3-none-any.whl (41kB)
Collecting billiard==3.5.0.1 (from -r requirements.txt (line 4))
Downloading billiard-3.5.0.1.tar.gz (156kB)
Collecting Bottleneck==1.1.0 (from -r requirements.txt (line 5))
Downloading Bottleneck-1.1.0.tar.gz (436kB)
Collecting celery==3.1.24 (from -r requirements.txt (line 6))
Downloading celery-3.1.24-py2.py3-none-any.whl (526kB)
Collecting colormath==2.1.1 (from -r requirements.txt (line 7))
Downloading colormath-2.1.1.tar.gz
Collecting decorator==4.0.10 (from -r requirements.txt (line 8))
Downloading decorator-4.0.10-py2.py3-none-any.whl
Collecting Django==1.9.11 (from -r requirements.txt (line 9))
Downloading Django-1.9.11-py2.py3-none-any.whl (6.6MB)
Collecting django-celery==3.1.17 (from -r requirements.txt (line 10))
Downloading django-celery-3.1.17.tar.gz (79kB)
Collecting django-debug-toolbar==1.5 (from -r requirements.txt (line 11))
Downloading django_debug_toolbar-1.5-py2.py3-none-any.whl (204kB)
Collecting django-extensions==1.7.4 (from -r requirements.txt (line 12))
Downloading django_extensions-1.7.4-py2.py3-none-any.whl (200kB)
Collecting django-filter==0.15.3 (from -r requirements.txt (line 13))
Downloading django_filter-0.15.3-py2.py3-none-any.whl (48kB)
Collecting django-nested-admin==3.0.12 (from -r requirements.txt (line 14))
Downloading django_nested_admin-3.0.12-py2.py3-none-any.whl (235kB)
Collecting django-widget-tweaks==1.4.1 (from -r requirements.txt (line 15))
Downloading django_widget_tweaks-1.4.1-py2.py3-none-any.whl
Collecting djangorestframework==3.5.2 (from -r requirements.txt (line 16))
Downloading djangorestframework-3.5.2-py2.py3-none-any.whl (709kB)
Collecting factory-boy==2.7.0 (from -r requirements.txt (line 17))
Downloading factory_boy-2.7.0-py2.py3-none-any.whl
Collecting fake-factory==0.7.2 (from -r requirements.txt (line 18))
Downloading fake_factory-0.7.2-py2.py3-none-any.whl (530kB)
Collecting isodate==0.5.4 (from -r requirements.txt (line 19))
Downloading isodate-0.5.4.tar.gz
Collecting isort==4.2.5 (from -r requirements.txt (line 20))
Downloading isort-4.2.5-py2.py3-none-any.whl (40kB)
Collecting kombu==3.0.35 (from -r requirements.txt (line 21))
Downloading kombu-3.0.35-py2.py3-none-any.whl (240kB)
Collecting Markdown==2.6.7 (from -r requirements.txt (line 22))
Downloading Markdown-2.6.7.zip (413kB)
Collecting networkx==1.11 (from -r requirements.txt (line 23))
Downloading networkx-1.11-py2.py3-none-any.whl (1.3MB)
Collecting numexpr==2.6.1 (from -r requirements.txt (line 24))
Downloading numexpr-2.6.1-cp34-cp34m-manylinux1_x86_64.whl (387kB)
Collecting numpy==1.11.2 (from -r requirements.txt (line 25))
Downloading numpy-1.11.2-cp34-cp34m-manylinux1_x86_64.whl (15.6MB)
Collecting pandas==0.19.0 (from -r requirements.txt (line 26))
Downloading pandas-0.19.0-cp34-cp34m-manylinux1_x86_64.whl (17.6MB)
Collecting pep8==1.7.0 (from -r requirements.txt (line 27))
Downloading pep8-1.7.0-py2.py3-none-any.whl (41kB)
Collecting psycopg2==2.6.2 (from -r requirements.txt (line 28))
Downloading psycopg2-2.6.2.tar.gz (376kB)
Collecting py==1.4.31 (from -r requirements.txt (line 29))
Downloading py-1.4.31-py2.py3-none-any.whl (81kB)
Collecting pyflakes==1.3.0 (from -r requirements.txt (line 30))
Downloading pyflakes-1.3.0-py2.py3-none-any.whl (222kB)
Collecting pyHarmonySearch==1.3.3 (from -r requirements.txt (line 31))
Downloading pyHarmonySearch-1.3.3.tar.gz
Collecting pylibmc==1.5.1 (from -r requirements.txt (line 32))
Downloading pylibmc-1.5.1.tar.gz (59kB)
Collecting pyshp==1.2.10 (from -r requirements.txt (line 33))
Downloading pyshp-1.2.10.tar.gz (176kB)
Collecting pytest==3.0.3 (from -r requirements.txt (line 34))
Downloading pytest-3.0.3-py2.py3-none-any.whl (169kB)
Collecting pytest-django==3.0.0 (from -r requirements.txt (line 35))
Downloading pytest_django-3.0.0-py2.py3-none-any.whl
Collecting python-dateutil==2.5.3 (from -r requirements.txt (line 36))
Downloading python_dateutil-2.5.3-py2.py3-none-any.whl (201kB)
Collecting python-monkey-business==1.0.0 (from -r requirements.txt (line 37))
Downloading python_monkey_business-1.0.0-py2.py3-none-any.whl
Collecting pytz==2016.7 (from -r requirements.txt (line 38))
Downloading pytz-2016.7-py2.py3-none-any.whl (480kB)
Collecting requests==2.11.1 (from -r requirements.txt (line 39))
Downloading requests-2.11.1-py2.py3-none-any.whl (514kB)
Collecting scipy==0.18.1 (from -r requirements.txt (line 40))
Downloading scipy-0.18.1-cp34-cp34m-manylinux1_x86_64.whl (40.2MB)
Collecting six==1.10.0 (from -r requirements.txt (line 41))
Downloading six-1.10.0-py2.py3-none-any.whl
Collecting spectra==0.0.7 (from -r requirements.txt (line 42))
Downloading spectra-0.0.7.tar.gz
Collecting sqlparse==0.2.2 (from -r requirements.txt (line 43))
Downloading sqlparse-0.2.2-py2.py3-none-any.whl
Collecting vine==1.1.3 (from -r requirements.txt (line 44))
Downloading vine-1.1.3-py2.py3-none-any.whl
Collecting whitenoise==3.2.2 (from -r requirements.txt (line 45))
Downloading whitenoise-3.2.2-py2.py3-none-any.whl
Collecting xlrd==1.0.0 (from -r requirements.txt (line 46))
Downloading xlrd-1.0.0-py3-none-any.whl (143kB)
Installing collected packages: amqp, anyjson, pep8, autopep8, billiard, numpy, Bottleneck, kombu, pytz, celery, decorator, networkx, colormath, Django, django-celery, sqlparse, django-debug-toolbar, six, django-extensions, django-filter, python-monkey-business, django-nested-admin, django-widget-tweaks, djangorestframework, python-dateutil, fake-factory, factory-boy, isodate, isort, Markdown, numexpr, pandas, psycopg2, py, pyflakes, pyHarmonySearch, pylibmc, pyshp, pytest, pytest-django, requests, scipy, spectra, vine, whitenoise, xlrd
Running setup.py install for anyjson: started
Running setup.py install for anyjson: finished with status 'done'
Running setup.py install for billiard: started
Running setup.py install for billiard: finished with status 'done'
Running setup.py install for Bottleneck: started
Running setup.py install for Bottleneck: finished with status 'done'
Running setup.py install for colormath: started
Running setup.py install for colormath: finished with status 'done'
Running setup.py install for django-celery: started
Running setup.py install for django-celery: finished with status 'done'
Running setup.py install for isodate: started
Running setup.py install for isodate: finished with status 'done'
Running setup.py install for Markdown: started
Running setup.py install for Markdown: finished with status 'done'
Running setup.py install for psycopg2: started
Running setup.py install for psycopg2: finished with status 'done'
Running setup.py install for pyHarmonySearch: started
Running setup.py install for pyHarmonySearch: finished with status 'done'
Running setup.py install for pylibmc: started
Running setup.py install for pylibmc: finished with status 'done'
Running setup.py install for pyshp: started
Running setup.py install for pyshp: finished with status 'done'
Running setup.py install for spectra: started
Running setup.py install for spectra: finished with status 'done'
Successfully installed Bottleneck-1.1.0 Django-1.9.11 Markdown-2.6.7 amqp-1.4.9 anyjson-0.3.3 autopep8-1.2.4 billiard-3.5.0.1 celery-3.1.24 colormath-2.1.1 decorator-4.0.10 django-celery-3.1.17 django-debug-toolbar-1.5 django-extensions-1.7.4 django-filter-0.15.3 django-nested-admin-3.0.12 django-widget-tweaks-1.4.1 djangorestframework-3.5.2 factory-boy-2.7.0 fake-factory-0.7.2 isodate-0.5.4 isort-4.2.5 kombu-3.0.35 networkx-1.11 numexpr-2.6.1 numpy-1.11.2 pandas-0.19.0 pep8-1.7.0 psycopg2-2.6.2 py-1.4.31 pyHarmonySearch-1.3.3 pyflakes-1.3.0 pylibmc-1.5.1 pyshp-1.2.10 pytest-3.0.3 pytest-django-3.0.0 python-dateutil-2.5.3 python-monkey-business-1.0.0 pytz-2016.7 requests-2.11.1 scipy-0.18.1 six-1.10.0 spectra-0.0.7 sqlparse-0.2.2 vine-1.1.3 whitenoise-3.2.2 xlrd-1.0.0
$ printf "[pytest]\nDJANGO_SETTINGS_MODULE = settings_ci\n" > pytest.ini
$ cd webapp/
$ ./manage_ci.py migrate
Operations to perform:
Apply all migrations: admin, sites, swap, contenttypes, authtoken, djcelery, auth, sessions
Running migrations:
Rendering model states... DONE
Applying contenttypes.0001_initial... OK
Applying auth.0001_initial... OK
Applying admin.0001_initial... OK
...
...
...
It seems to be related to the way the NumPy requirement is handled in 1.2.0.
Issue Analytics
- State:
- Created 7 years ago
- Comments:8
Top Results From Across the Web
Error installing Bottleneck 1.2.0 from behind proxy #158 - GitHub
I just ran into an error where some unit tests are failing after upgrading from 1.1.0 to 1.2.0. This is on a work-hosted...
Read more >Sklearn is unstable on Apple Silicon
Hi,. I installed skearn successfully and ran the MINIST toy example successfully. then I started to run my project. The finning thing everything...
Read more >[ncl-install] ncl: error while loading shared libraries: libkea.so.1.4
Is this the root environment in an Anaconda installation? Sometimes conda struggles to install compatible versions of non-Anaconda packages ...
Read more >git bash - Invalid requirement - Stack Overflow
Try pip list --format=freeze > requirements.txt and rerun. It looks like this is caused by changing the behavior of pip freeze .
Read more >MapProxy — Blog
We improved mapproxy-seed to be more resilient with unstable sources. It prints more useful error messages and retries to request images for longer:...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I’d like to reopen this issue. I finally spent the time to move NumPy to the top of the requirements file. Here’s my current requirements file:
Here’s the error that CI is throwing:
So even though NumPy is listed before Bottleneck, this doesn’t fix the error. Downgrading Bottleneck to 1.1.0 fixes the problem.
Excellent question. What is looks like is that running
pip install -r requirements.txtcauses pip to download all packages before installing them. Something in Bottleneck is causing pip to check for NumPy as soon as Bottleneck is downloaded before pip gets to the install phase for NumPy.