Installing Explorerhat (or any library) on Pi Zero without internet connection


I have a Pi zero and explorer phat. in order to get the these to work together i need to install the exlorerhat library. However with the pi zero having no internet connection, i was wondering if there is a way to install it on my computer and transfer it to the pi’s SD card?

You could download the current library from pypi from here:

then copy it to the /boot/ partition of the SD. Once booted into the Pi, copy to a suitable location, uncompress and run:

sudo python install

… if you want the examples you will want to copy them from the github repository.

Alternatively I would invest is a WiFi dongle and shim - if only for installation purposes, the workaround outlined here, if you have to repeat regularly, to install additional modules etc could get old very quickly IMO.

You can do two things:

  1. Download the zip using the “Clone or download” button on the right here:

  2. Grab the latest .deb from releases:

In both instances, you may have trouble with the dependencies; the other software and packages that our libraries require to run.

Darn it! @RogueM is just too fast :D

actually, yes, I also recommend method 2 suggested by @gadgetoid, since it is available for ExplorerHAT.

That deb only requires rpi-gpio IIRC which is installed by default, at least for python2 if your image is of Jessie Lite.

ah, no, you will want to also grab this dependency:

and run:

sudo dkpg -i python-cap1xxx
sudo dpkg -i python-explorerhat

and of course you would need smbus installed first and foremost, which is going to be another hurdle with Jessie Lite (I think it is installed by default in the full image).

… honestly, grab a cheap USB dongle, life is too short to mess about with dependencies knocking them out one at a time over a FAT partition.

Nice one!

Cheers guys, i’ll just get a dongle and usb hub and do it the easy way :)


Other option is to use the ethernet gadget and share your desktop pc Internet connection with it:

That’s how I got all the necessaries onto my pi zero.

1 Like

That is how I do it and just ssh to the zero, its dead easy to setup and from any computer just enable internet sharing.

That is if you have internet access though and its not just a matter of not having a USB ethernet dongle.

The ethernet gadget mode really makes the Zero and its relatively easy to edit the settings whilst in a cardreader for linux.

I had real problems getting linux filesystem support with windows 10 which from memory was never a problem before.
I just dual booted my machine and run debian with windows 10 now.

But like the guys say with no local internet you could download and use the packaging tool dkpg but wow can quickly turn into hassle and a long winded method.

I do the ethernet tweaks as it makes things real easy.

Its shows the mac method of internet sharing but in windows just go to the main internet ethernet device properties and share it. Its the same setup.