Trouble Installing Blinkt pHat


#1

Hi all,

Im having issues installing the blinkt pHat. I run the following command: sudo curl -sS get.pimoroni.com/blinkt | bash

however the script bails out when installing the Blinkt! library for Python 2

Installing Blinkt! library for Python 2…

Traceback (most recent call last):
File “/usr/bin/pip”, line 9, in
load_entry_point(‘pip==1.5.6’, ‘console_scripts’, ‘pip’)()
File “/usr/lib/python2.7/dist-packages/pkg_resources.py”, line 356, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File “/usr/lib/python2.7/dist-packages/pkg_resources.py”, line 2476, in load_entry_point
return ep.load()
File “/usr/lib/python2.7/dist-packages/pkg_resources.py”, line 2190, in load
[‘name’])
File “/usr/lib/python2.7/dist-packages/pip/init.py”, line 74, in
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File “/usr/lib/python2.7/dist-packages/pip/vcs/mercurial.py”, line 9, in
from pip.download import path_to_url
File “/usr/lib/python2.7/dist-packages/pip/download.py”, line 25, in
from requests.compat import IncompleteRead
ImportError: cannot import name IncompleteRead
Python 2 library install failed!
If problems persist, visit forums.pimoroni.com for support"

Any ideas? Thanks


#2

PyPi, where our libraries are hosted has been temperamental lately. The best advice I can give you is to try again every few hours.

Failing that you can try cloning the gothic repo and install manually, this board has next to no dependency so that should be relatively straightforward. Let us know if you need help with that.


#3

Thanks rogueM I will give it another go tonight. Thanks for quick response!


#4

Been trying constantly all day with no luck.

I have cloned the github repo, how do i now install as jsut running the python scripts produce and error.

Apologies for noob questions!


#5

cd into the library folder then run:

sudo python setup.py install

(replace or replicate using python3 if your preference is for python 3)


#6

Thanks worked perfect!


#7

I’m super new to this what does “cd” mean. I’m also having the same issue.


#8

Cd means “change directory”


#9

This is what I get when I install from terminal on my raspberry pi 3.


#10

And thank you for any help


#11

Looks like you need python-dev to compile RPi-GPIO.
… rpi-gpio should already be installed on a Pi though, try:

sudo apt-get install python-rpi.gpio

and if that doesn’t work, then:

sudo apt-get install python-dev

#12

Thanks. sudo apt-get install python-dev. Got me past that but now it looks like I’<img src="/uploads/pimoroni/original/2X/2/2184b250ef8bad7ee7a1736d7a7e9101aa75eacd.jpg"

width=“690” height=“431”>m lost in anouter spot


#13

Might be because your Python script is called “blinkt.py” and it’s confused about where it should be importing those methods from?


#14

Yes, exactly, you should never call a script as per one of the module you import in it. See the following for the explanation:

http://python-notes.curiousefficiency.org/en/latest/python_concepts/import_traps.html#the-name-shadowing-trap


#15

Thanks guys. I’ll have to try it later today, I have a long honey do list to complete today. And thanks again for to help it means alot


#16

Ok I tried changing the name and just started over I get the same message , but with the new name i saved it under. It as if the library is missing.


#17

If you go into the Python shell and type “import blinkt” what do you get?


#18

The same message as the screenshots


#19

Ok so I thought I renamed the file but it is still there is there a way to delete it. Thanks for the help


#20

You should just be able to rename or remove it. Maybe try working in a different directory to make sure?