question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't install anything with pip (connection error)

See original GitHub issue

Hello,

I’m running Arch Linux on Raspberry Pi with python 3.4.1-1 and python-pip 1.5.6-1 and I can’t install anything.

For example, I can successfuly create virtualenv test:

Using base prefix '/usr'
New python executable in test/bin/python3
Also creating executable in test/bin/python
Installing setuptools, pip... done.

then I activate venv: source test/bin/activate and check packages pip list

pip (1.5.5)
setuptools (3.4.4)

And then when I try to search e.g. pytz using pip search pytz it works OK:

pytz                      - World timezone definitions, modern and historical
django-datetimezone-field - A Django app providing database and form fields for split datetime/time and pytz timezone objects.
gaepytz                   - A version of pytz that works well on Google App Engine.
django-timezone-field     - A Django app providing database and form fields for pytz timezone objects.
pytzpure                  - A pure-Python version of PYTZ (timezones).
mytz                      - A drop-in replacement for pytz.

but when I run pip install pytz --verbose I get:

Downloading/unpacking pytz
  Could not fetch URL https://pypi.python.org/simple/pytz/: connection error: [Errno 2] No such file or directory
  Will skip URL https://pypi.python.org/simple/pytz/ when looking for download links for pytz
  Could not fetch URL https://pypi.python.org/simple/: connection error: [Errno 2] No such file or directory
  Will skip URL https://pypi.python.org/simple/ when looking for download links for pytz
  Cannot fetch index base URL https://pypi.python.org/simple/
  Could not fetch URL https://pypi.python.org/simple/pytz/: connection error: [Errno 2] No such file or directory
  Will skip URL https://pypi.python.org/simple/pytz/ when looking for download links for pytz
  Could not find any downloads that satisfy the requirement pytz
Cleaning up...
  Removing temporary dir /root/test/build...
No distributions at all found for pytz
Exception information:
Traceback (most recent call last):
  File "/root/test/lib/python3.4/site-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/root/test/lib/python3.4/site-packages/pip/commands/install.py", line 278, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/root/test/lib/python3.4/site-packages/pip/req.py", line 1177, in prepare_files
    url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
  File "/root/test/lib/python3.4/site-packages/pip/index.py", line 277, in find_requirement
    raise DistributionNotFound('No distributions at all found for %s' % req)
pip.exceptions.DistributionNotFound: No distributions at all found for pytz

Storing debug log for failure in /root/.pip/pip.log

Of course it doesn’t work with any package. Apart from this, device is working fine - It has working connection (it is web server and works fine, I can ping/ssh outside/inside etc.) and I’m not using proxy (it is connected right to the router).

I can (and I have to) install packages manually (download them using wget and then use pip to install them).

Thank you

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
pradyunsgcommented, Jun 10, 2018

@SagarDaya379 you seem to be behind a firewall that’s blocking your connection. Could you file a new issue for it?

0reactions
lock[bot]commented, Jun 2, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python pip cannot install anything - Stack Overflow
Python pip cannot install anything · You may need to update your version of pip pip install --upgrade pip and then run pip...
Read more >
Can't install anything on pip - Super User
The package setup script has attempted to modify files on your system that are not within the EasyInstall build area, and has been...
Read more >
How to install modules with PIP (and fix it when it fails) - Medium
First make sure that you have installed Python. Assuming that, the first thing to do is to check if the module exists. The...
Read more >
Could not install packages due to an OSError [FIX] - YouTube
This video we'll talk about how to fix the following error : “ Could not install packages due to an OSError”. I had...
Read more >
How to Install Pip on Windows - ActiveState
One of the most common problems with running Python tools like pip is the “not on PATH” error. This means that Python cannot...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found