Netbox on Raspberry Pi 4

320 views
Skip to first unread message

David Veatch

unread,
Jan 28, 2020, 4:49:50 PM1/28/20
to NetBox
I'm attempting to install Netbox on a brand new fresh Raspberry Pi 4 but am getting a Pillow dependency error. My Google-Fu has failed me, and I only found one other post about this over on reddit for which there was no resolution to the Python dependency problem, only sad abandonment.

Everything goes through and installs just fine without error until this:

$ python3 manage.py migrate
SystemCheckError: System check identified some issues:

ERRORS
:
extras
.ImageAttachment.image: (fields.E210) Cannot use ImageField because Pillow is not installed.
        HINT
: Get Pillow at https://pypi.org/project/Pillow/ or run command "pip install Pillow".

Pillow is installed, but via pip3, not pip (likely a clue?):

$ pip3 install Pillow
Looking in indexes: https://pypi.org/simple,
Requirement already satisfied: Pillow==7.0.0 in /usr/local/lib/python3.7/dist-packages (from -r requirements.txt (line 18)) (7.0.0)

and:

>>> help("modules Pillow")

Here is a list of modules whose name or summary contains 'Pillow'.
If there are any, enter a module name to get more help.

PIL
- Pillow (Fork of the Python Imaging Library)
PIL
.DdsImagePlugin - A Pillow loader for .dds files (S3TC-compressed aka DXTC)
PIL
.FtexImagePlugin - A Pillow loader for .ftc and .ftu files (FTEX)

Some additional info:

$ cat /sys/firmware/devicetree/base/model;echo
Raspberry Pi 4 Model B Rev 1.1
$ uname
-a
Linux raspberrypi 4.19.93-v7l+ #1290 SMP Fri Jan 10 16:45:11 GMT 2020 armv7l GNU/Linux
$ python3
--version
Python 3.7.3

Anyone care to share any ideas?

Jeremy Stretch

unread,
Jan 28, 2020, 5:10:41 PM1/28/20
to David Veatch, NetBox
Does this import successfully?

$ python3 manage.py nbshell
>>> import PIL

Also, did you run `pip3 install -r requirements.txt` to ensure all of the dependencies are up to date?

--
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/da292593-2b7b-442f-b119-8e0812af6a6b%40googlegroups.com.


--
Jeremy Stretch
Sr. Network Automation Engineer
Network to Code, LLC

David Veatch

unread,
Jan 28, 2020, 7:04:09 PM1/28/20
to NetBox
Thanks for the reply, Jeremy.

Yeah, I ran `pip3 install -r requirements.txt` and everything comes back OK without exception.  Running now gives "Requirement already satisfied" for all.

Attempting to run `python3 manage.py nbshell` results in the same, unfortunately.

$ python3 manage.py nbshell
SystemCheckError: System check identified some issues:

ERRORS
:
extras
.ImageAttachment.image: (fields.E210) Cannot use ImageField because Pillow is not installed.
        HINT
: Get Pillow at https://pypi.org/project/Pillow/ or run command "pip install Pillow".
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-...@googlegroups.com.
Message has been deleted

Jeremy Stretch

unread,
Jan 28, 2020, 7:51:57 PM1/28/20
to David Veatch, NetBox
ImageAttachment is part of NetBox, not Pillow, so that's fine.

Try:

$ pip uninstall PIL
$ pip uninstall Pillow
$ pip install Pillow

To clean out any previous installations.


On Tue, Jan 28, 2020, 7:12 PM David Veatch <dvi...@gmail.com> wrote:
FWIW, in a Python shell, when I run `help("modules Pillow")` and `help("modules PIL"), I notice that neither output includes "ImageAttachment" or "ImageField".  If either/or are supposed to be explicitly stated in that output, it's not.

I'm actively looking myself rather than just relying on answers here.  If I happen to find it, I'll post the solution.  In the meantime, thanks for any assistance.

On Tuesday, January 28, 2020 at 4:10:41 PM UTC-6, Jeremy Stretch wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-...@googlegroups.com.


--
Jeremy Stretch
Sr. Network Automation Engineer
Network to Code, LLC

--
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-discus...@googlegroups.com.

Daniel Sheppard

unread,
Jan 28, 2020, 8:34:53 PM1/28/20
to NetBox
Could this be an issue with whatever libraries are installed on the OS (Not sure what OS you can run on RaspPi, maybe just whatever embedded OS it has)?

David Veatch

unread,
Jan 29, 2020, 9:09:54 AM1/29/20
to NetBox
Re: ImageAttachment, excellent.

I had found the `pip uninstall PIL; pip uninstall Pillow; pip install Pillow` steps and ran through them early on... didn't seem to help.
Message has been deleted

David Veatch

unread,
Jan 29, 2020, 9:13:54 AM1/29/20
to NetBox
It's running a varient of Debian called Raspbian, optimized for the ARM hardware.  It very much is likely due to some OS library or missing link somewhere... I just don't know what, and can't find any reference to it.  Details on getting Netbox on a Raspberry are slim-to-none out here in the world.  Gonna keep trying, though.

On Tuesday, January 28, 2020 at 7:34:53 PM UTC-6, Daniel Sheppard wrote:
Could this be an issue with whatever libraries are installed on the OS (Not sure what OS you can run on RaspPi, maybe just whatever embedded OS it has)?

[edit for spelling] 

Brian Candler

unread,
Jan 30, 2020, 4:45:55 AM1/30/20
to NetBox
> I had found the `pip uninstall PIL; pip uninstall Pillow; pip install Pillow` steps and ran through them early on... didn't seem to help.

What about with pip3 rather than pip?

Are you logging in to RPi as a non-root user, then doing "sudo"? Try "sudo -H pip3 ..." instead.

David Veatch

unread,
Jan 30, 2020, 7:53:55 AM1/30/20
to NetBox
Same result.  I tried both pip3 and pip, logged in as root and using sudo... current theory is that there's some missing library or link on Raspbian that I'm trying to track down.

--
You received this message because you are subscribed to a topic in the Google Groups "NetBox" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/netbox-discuss/xqEWwCHiw-E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to netbox-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/ad4c384a-55e2-40ff-a8a2-ad920ce2b274%40googlegroups.com.

Jeremy Stretch

unread,
Jan 30, 2020, 9:11:31 AM1/30/20
to David Veatch, NetBox
I wonder if it's missing a required system library. Try installing the libraries listed here:

sudo apt-get install libjpeg-dev zlib1g-dev libfreetype6-dev liblcms1-dev libopenjp2-7 libtiff5

You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/CAMrpqLC5KGEQfR%3Di5U1vmJbg9KyhvSToVNNvxpk5r_Mm1zjjgw%40mail.gmail.com.

David Veatch

unread,
Jan 30, 2020, 11:53:47 AM1/30/20
to NetBox
That did it!  Thanks so much!

On Thursday, January 30, 2020 at 8:11:31 AM UTC-6, Jeremy Stretch wrote:
I wonder if it's missing a required system library. Try installing the libraries listed here:

sudo apt-get install libjpeg-dev zlib1g-dev libfreetype6-dev liblcms1-dev libopenjp2-7 libtiff5

On Thu, Jan 30, 2020 at 7:53 AM David Veatch <dvi...@gmail.com> wrote:
Same result.  I tried both pip3 and pip, logged in as root and using sudo... current theory is that there's some missing library or link on Raspbian that I'm trying to track down.

On Thu, Jan 30, 2020 at 3:45 AM Brian Candler <b.ca...@pobox.com> wrote:
> I had found the `pip uninstall PIL; pip uninstall Pillow; pip install Pillow` steps and ran through them early on... didn't seem to help.

What about with pip3 rather than pip?

Are you logging in to RPi as a non-root user, then doing "sudo"? Try "sudo -H pip3 ..." instead.

--
You received this message because you are subscribed to a topic in the Google Groups "NetBox" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/netbox-discuss/xqEWwCHiw-E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to netbox-...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages