# Inky pHAT setup

**URL:** <https://forums.pimoroni.com/t/inky-phat-setup/10552>\
**Category:** Support\
**Created:** [May 21, 2019, 12:13am UTC](https://forums.pimoroni.com/t/inky-phat-setup/10552 "2019-05-21T00:13:08Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mollymf](https://avatars.discourse-cdn.com/v4/letter/m/50afbb/32.png) [@mollymf](https://forums.pimoroni.com/u/mollymf)\
**Post date:** [May 21, 2019, 12:13am UTC](https://forums.pimoroni.com/t/inky-phat-setup/10552/1 "2019-05-21T00:13:09Z")

</div>

I am trying to follow the tutorial for setting up my inky phat ([https://learn.pimoroni.com/tutorial/sandyj/getting-started-with-inky-phat](https://learn.pimoroni.com/tutorial/sandyj/getting-started-with-inky-phat)) but have run into issues in trying to run the examples. Everything installed properly, yet when I try the nametag example, I get the following:

Use Inky pHAT/wHAT as a personalised name badge!

Traceback (most recent call last):  
File “/home/pi/Pimoroni/inky/examples/name-badge.py”, line 29, in   
inky\_display = InkyPHAT(colour)  
File “/usr/local/lib/python2.7/dist-packages/inky/phat.py”, line 27, in **init**  
v\_flip=False)  
File “/usr/local/lib/python2.7/dist-packages/inky/inky.py”, line 74, in **init**  
self.eeprom = eeprom.read\_eeprom()  
File “/usr/local/lib/python2.7/dist-packages/inky/eeprom.py”, line 103, in read\_eeprom  
i2c = SMBus(1)  
File “/usr/local/lib/python2.7/dist-packages/smbus2/smbus2.py”, line 253, in **init**  
self.open(bus)  
File “/usr/local/lib/python2.7/dist-packages/smbus2/smbus2.py”, line 265, in open  
self.fd = os.open("/dev/i2c-{}".format(bus), os.O\_RDWR)  
OSError: [Errno 2] No such file or directory: ‘/dev/i2c-1’

I tried reinstalling the directory and examples via github but this made no difference. Please help.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [May 21, 2019, 8:33am UTC](https://forums.pimoroni.com/t/inky-phat-setup/10552/2 "2019-05-21T08:33:39Z")

</div>

Try running it in Python3, it looks like your running it in python 2. It should work in both but try python 3 anyway just to see what happens.  
And did you install any other Hats or pHats on that Pi previous to this? Or maybe run another installer previously thats mucking things up?

---

<div class="post-metadata">

**Author:** ![mollymf](https://avatars.discourse-cdn.com/v4/letter/m/50afbb/32.png) [@mollymf](https://forums.pimoroni.com/u/mollymf)\
**Post date:** [June 7, 2019, 4:18am UTC](https://forums.pimoroni.com/t/inky-phat-setup/10552/4 "2019-06-07T04:18:02Z")

</div>

Hi there. I ran it in python 3 and have the same error. I installed the BLINKT previously so I’m not sure if that is creating the problem or something else. It seems its having trouble finding and installing certain packages from the library but I don’t know how to go about fixing that. The terminal is spitting out messages like this for several packages:

Apt failed to install python3-font\_source\_sans\_pro!  
Falling back on pypi…  
Requirement already satisfied: font\_source\_sans\_pro in /usr/local/lib/python3.5/dist-packages  
python-wikiquotes is required  
Installing python-wikiquotes…  
E: Unable to locate package python-wikiquotes  
Apt failed to install python-wikiquotes!  
Falling back on pypi…

Hope you can help

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [June 7, 2019, 8:40am UTC](https://forums.pimoroni.com/t/inky-phat-setup/10552/5 "2019-06-07T08:40:45Z")

</div>

If it was me, I’d reflash my card with a fresh image of Raspbian and start over from scratch. And foloow the tutorial to the letter.

---

<div class="post-metadata">

**Author:** ![GeofP](https://avatars.discourse-cdn.com/v4/letter/g/e5b9ba/32.png) [@GeofP](https://forums.pimoroni.com/u/GeofP)\
**Post date:** [June 10, 2019, 5:20pm UTC](https://forums.pimoroni.com/t/inky-phat-setup/10552/6 "2019-06-10T17:20:44Z")

</div>

I think you will find that if you enable the I2C interface this will solve the problem. I don’t know why, because I thought the pHAT doesn’t use the I2C, only the SPI.

At the command prompt, enter sudo raspi-config, select Interfacing Options then enable I2C.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [June 11, 2019, 8:47am UTC](https://forums.pimoroni.com/t/inky-phat-setup/10552/7 "2019-06-11T08:47:44Z")

</div>

It can’t hurt to turn on i2c but as far as I know the Pimoroni installer turns it on, if its off, for you. If its needed for that pHat.  
The Inky pHat doesn’t use i2c though. It’s not SPI either, not the normal SPI pins anyway. Which kind of makes sense as its not written too like a normal display.

> **[Inky pHAT at Raspberry Pi GPIO Pinout](https://pinout.xyz/pinout/inky_phat#)**
>
> An e-paper display for your Raspberry Pi

Also i2c being off when it should be on, I believe will get you all kinds of IO errors.

---

<div class="post-metadata">

**Author:** ![GeofP](https://avatars.discourse-cdn.com/v4/letter/g/e5b9ba/32.png) [@GeofP](https://forums.pimoroni.com/u/GeofP)\
**Post date:** [June 12, 2019, 6:42am UTC](https://forums.pimoroni.com/t/inky-phat-setup/10552/8 "2019-06-12T06:42:59Z")

</div>

The Pimoroni installer “curl [https://get.pimoroni.com/inky](https://get.pimoroni.com/inky) | bash” turns SPI on if it is off but it does not turn on I2C. If the examples are run without I2C enabled, the following error is produced:

OSError: [Errno 2] No such file or directory: ‘/dev/i2c-1’

I also run the older version of inky on another Pi, installed using “curl [https://get.pimoroni.com/inkyphat](https://get.pimoroni.com/inkyphat) | bash”. That also enabled SPI and not I2C and the example programs run on this version without requiring I2C.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [June 12, 2019, 8:54am UTC](https://forums.pimoroni.com/t/inky-phat-setup/10552/9 "2019-06-12T08:54:18Z")

</div>

Ok, I must be looking at the wrong Inky or something? The pinout says it doesn’t use i2c so now I’m really confused? Just for the record I don’t own an inky of any kind at the moment.

---

<div class="post-metadata">

**Author:** ![pommedeter](https://avatars.discourse-cdn.com/v4/letter/p/848f3c/32.png) [@pommedeter](https://forums.pimoroni.com/u/pommedeter)\
**Post date:** [September 22, 2019, 3:06pm UTC](https://forums.pimoroni.com/t/inky-phat-setup/10552/10 "2019-09-22T15:06:52Z")

</div>

I need the same help! I get the same error message. I’m running a brand new sd card with noobs and rasbian. I’m new to RPi and coding and tried to follow the instructions exactly. I’m not sure if my inky PHAT is defective or not because I can’t get it to run any of the examples. :(
