bnmc_
Posts: 15
Joined: Sat Dec 23, 2017 3:36 pm

Cannot install Python packages using pip

Fri Dec 29, 2017 9:47 am

Hey everyone,

I am having a recurring problem on my Raspberry Pi 2 Model B. Every time I install a package using pip, I am given the error "No distributions found at all for package-name." In particular, I am trying to install piui and plotly. What I have tried (all to no avail):
  • Reconnecting to the Internet
    Updating and upgrading apt-get
    Uninstalling and reinstalling python-pip and python3-pip
    Uninstalling and reinstalling python-setutptools
    Correcting my system time
    Using different versions of pip (pip, pip-3.2, pip-2.7)
However, if I attach

Code: Select all

--index-url=https://pypi.python.org/simple/
to the end of the command, a completely different error is outputted:

Code: Select all

Command python setup.py egg_info failed with error code 1 in /home/pi/build/nbformat
or

Code: Select all

Command python setup.py egg_info failed with error code 1 in /home/pi/build/cherrypy
Error logs: https://pastebin.com/e5XV3A1u and https://pastebin.com/JWXJpDCG

Please note that I am working on a project for a competition and there is a deadline that I must meet on January 6th. Any and all help is appreciated.

mattmiller
Posts: 2165
Joined: Thu Feb 05, 2015 11:25 pm

Re: Cannot install Python packages using pip

Fri Dec 29, 2017 11:16 am

Code: Select all

pi@raspberrypi:~ $ pip install piui
Collecting piui
  Downloading piui-0.0.9.tar.gz (58kB)
    100% |████████████████████████████████| 61kB 194kB/s 
Collecting cherrypy (from piui)
  Downloading CherryPy-13.1.0-py2.py3-none-any.whl (430kB)
    100% |████████████████████████████████| 440kB 160kB/s 
Collecting six>=1.11.0 (from cherrypy->piui)
  Downloading six-1.11.0-py2.py3-none-any.whl
Collecting cheroot>=5.9.1 (from cherrypy->piui)
  Downloading cheroot-6.0.0-py2.py3-none-any.whl (61kB)
    100% |████████████████████████████████| 71kB 383kB/s 
Collecting portend>=2.1.1 (from cherrypy->piui)
  Downloading portend-2.2-py2.py3-none-any.whl
Collecting more-itertools>=2.6 (from cheroot>=5.9.1->cherrypy->piui)
  Downloading more_itertools-4.0.1-py2-none-any.whl (44kB)
    100% |████████████████████████████████| 51kB 392kB/s 
Collecting tempora>=1.8 (from portend>=2.1.1->cherrypy->piui)
  Downloading tempora-1.10-py2.py3-none-any.whl
Collecting pytz (from tempora>=1.8->portend>=2.1.1->cherrypy->piui)
  Downloading pytz-2017.3-py2.py3-none-any.whl (511kB)
    100% |████████████████████████████████| 512kB 141kB/s 
Building wheels for collected packages: piui
  Running setup.py bdist_wheel for piui ... done
  Stored in directory: /home/pi/.cache/pip/wheels/11/d7/dc/8060ea786b8dff4182595896f1f249bc1c85d035d9ead45ba2
Successfully built piui
Installing collected packages: six, more-itertools, cheroot, pytz, tempora, portend, cherrypy, piui
Successfully installed cheroot-6.0.0 cherrypy-13.1.0 more-itertools-4.0.1 piui-0.0.9 portend-2.2 pytz-2017.3 six-1.11.0 tempora-1.10
pi@raspberrypi:~ $ 
I just ran the above install using vanilla latest 2017-11-29 Stretch on a PiZeroW (did't update/upgrade) so its not universally broken

Unfortunately, your system probably got a bit corrupted (or some confict with other packages has messed it up)

Its not usually worth time and effort to try and sort system issues out once they've gone wrong.

I'd recommend making a copy of any programs you've written yourself - re-install Stretch from a new image and start again

bnmc_
Posts: 15
Joined: Sat Dec 23, 2017 3:36 pm

Re: Cannot install Python packages using pip

Fri Dec 29, 2017 11:26 am

mattmiller wrote:
Fri Dec 29, 2017 11:16 am
re-install Stretch from a new image and start again
And how do I do that? I am using a Pi 2 Model B.

mattmiller
Posts: 2165
Joined: Thu Feb 05, 2015 11:25 pm

Re: Cannot install Python packages using pip

Fri Dec 29, 2017 11:39 am

I'm assuming from your question that you didn't setup the Pi in the first place - maybe your SD had NOOBS pre-installed on it?

So - having made sure you've made copies of your original work (as starting again will wipe EVERYTHING) then try following
https://www.raspberrypi.org/learning/so ... uickstart/

Come back if you get stuck at any point

PS I'd personally recommend installing standard Raspbian (scroll-down the instructions till you get to that bit)

bnmc_
Posts: 15
Joined: Sat Dec 23, 2017 3:36 pm

Re: Cannot install Python packages using pip

Fri Dec 29, 2017 11:56 am

mattmiller wrote:
Fri Dec 29, 2017 11:39 am
maybe your SD had NOOBS pre-installed on it?
That is most likely the case because the SD card came with the kit. However, I will try re-installing anyway.

bnmc_
Posts: 15
Joined: Sat Dec 23, 2017 3:36 pm

Re: Cannot install Python packages using pip

Sat Dec 30, 2017 7:57 am

I have finished reinstalling Raspbian, although when I booted my Pi, it remains at a command line environment. How do I switch to the desktop?

fruitoftheloom
Posts: 21330
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Cannot install Python packages using pip

Sat Dec 30, 2017 8:06 am

bnmc_ wrote:
Sat Dec 30, 2017 7:57 am
I have finished reinstalling Raspbian, although when I booted my Pi, it remains at a command line environment. How do I switch to the desktop?

Did you install Raspbian Stretch with Desktop ??

https://www.raspberrypi.org/downloads/raspbian/
Retired disgracefully.....
This at present is my daily "computer" https://www.asus.com/us/Chrome-Devices/Chromebit-CS10/

User avatar
bensimmo
Posts: 4211
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Cannot install Python packages using pip

Sat Dec 30, 2017 8:08 am

If you used the lite version, you need to full with desktop version.
If not it normally goes to the desktop by itself.

But
startx
Would do it, you can then make it do it automatically in the settings.

mattmiller
Posts: 2165
Joined: Thu Feb 05, 2015 11:25 pm

Re: Cannot install Python packages using pip

Sat Dec 30, 2017 8:55 am

If you used the lite version, you need to full with desktop version.
Yes - don't install the lite version - use the full - lite is for uber-geeks

User avatar
Cancelor
Posts: 759
Joined: Wed Aug 28, 2013 4:09 pm
Location: UK

Re: Cannot install Python packages using pip

Sat Dec 30, 2017 9:37 am

Can't find the thread you want? Try googling : YourSearchHere site:raspberrypi.org

bnmc_
Posts: 15
Joined: Sat Dec 23, 2017 3:36 pm

Re: Cannot install Python packages using pip

Sat Dec 30, 2017 4:48 pm

I would like to thank you all for your support. Everything is working perfectly now. I was able to successfully install both packages, and as a silver lining, my Pi now runs more smoothly with the new Raspbian.

Return to “Troubleshooting”