# Using the Explorer Hat Pro in Python3

**URL:** <https://forums.pimoroni.com/t/using-the-explorer-hat-pro-in-python3/1009>\
**Category:** Support\
**Created:** [September 17, 2015, 8:48pm UTC](https://forums.pimoroni.com/t/using-the-explorer-hat-pro-in-python3/1009 "2015-09-17T20:48:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dansmith](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/dansmith/32/1543_2.png) [@dansmith](https://forums.pimoroni.com/u/dansmith)\
**Post date:** [September 17, 2015, 8:48pm UTC](https://forums.pimoroni.com/t/using-the-explorer-hat-pro-in-python3/1009/1 "2015-09-17T20:48:21Z")

</div>

I have a feeling that this is probably something simple, but I have just followed the Explorer Hat install instructions from GitHub on a fresh install of Raspbian and I am having some issues using it with Python3.

I have installed Python-smbus, but if I try importing the Explorer Hat library in Python3 it tells me that that it isn’t installed.

![](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex016/uploads/pimoroni/original/1X/a9d253663530c9dbdc0ffc8fa04389ea6f9fcf40.jpg)

Python 2 works fine. What am I missing?

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [September 17, 2015, 9:57pm UTC](https://forums.pimoroni.com/t/using-the-explorer-hat-pro-in-python3/1009/2 "2015-09-17T21:57:00Z")

</div>

Ah, looks like i need to do some Python version checking and tweak the advice accordingly!

For Python 3 it should say:

```nohighlight
Install with: sudo apt-get install python3-smbus

```

---

<div class="post-metadata">

**Author:** ![dansmith](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/dansmith/32/1543_2.png) [@dansmith](https://forums.pimoroni.com/u/dansmith)\
**Post date:** [September 18, 2015, 6:06am UTC](https://forums.pimoroni.com/t/using-the-explorer-hat-pro-in-python3/1009/3 "2015-09-18T06:06:02Z")

</div>

Ah damn, I knew it was going to be something simple! Slightly embarrassing…

Thanks for your help!

---

<div class="post-metadata">

**Author:** ![MAPorter](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@MAPorter](https://forums.pimoroni.com/u/MAPorter)\
**Post date:** [October 3, 2015, 8:26am UTC](https://forums.pimoroni.com/t/using-the-explorer-hat-pro-in-python3/1009/4 "2015-10-03T08:26:19Z")

</div>

Hmm I’ve follow this suggestion to the letter & installed with: **sudo apt-get install python3-smbus**.  
However it doesn’t do a thing for me, the problem still persists with my Explorer HAT Pro, in as much as I still get the same warning as Dan doe’s, “Python-smbus isn’t installed” when using Python 3.

For the record I’m using the latest version of Raspbian Noobs: Version:1.4.2, Release date:2015-09-24 - Any suggestions would be gratefully received?

Personally IMO the Git could do with a re-write to make it a little easier for youngster’s & newbies to follow, with clearer instructions on how to install the examples library & instructions on the basic usage of the HAT with perhaps examples including a picture or two, showing something basic like lighting an led or connecting a motor to the to the hat.

If you were a youngster who’d just received this as a present or used their pocket money to purchase, I think you’d struggle to use it with it’s current documentation. Wading through support forums isn’t something you have should do for a retail item.

Cheers

Mark

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [October 8, 2015, 8:15am UTC](https://forums.pimoroni.com/t/using-the-explorer-hat-pro-in-python3/1009/5 "2015-10-08T08:15:25Z")

</div>

It looks like you’ve run into a bug with the `python3-smbus` package on Jessie that was found and fixed a few days ago ( see this thread: [https://www.raspberrypi.org/forums/viewtopic.php?f=32&t=122260&p=823965](https://www.raspberrypi.org/forums/viewtopic.php?f=32&t=122260&p=823965) ).

You should be able to get a non-broken version installed now using:

```bash
sudo apt-get update
sudo apt-get install -y --reinstall python3-smbus

```

I’ve made some changes to the library to give better instructions in the case of a missing `smbus`, and I’ll make sure the easy-installer is updated to install for both Python 2 and 3 automagically- I think it’s a little outdated.

I’ll look over the Git page, too, I’ve been slowly going through our old libraries and making some code quality fixes and other tweaks so they don’t succumb to bit-rot, making the documentation/installers better would be a logical next step although I’d favour a much more visual guide on our learning portal.
