question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to determine if this system is a Raspberry Pi

See original GitHub issue

I have installed official supported Ubuntu server from an official raspberry Pi website and their official guidance (https://www.raspberrypi.org/downloads/).

Now, I’m trying to install picamera from pip but I’m getting an error: Unable to determine if this system is a Raspberry Pi

uname -r
4.15.0-1031-raspi2
>>> os.uname()
('Linux', 'raspberrya.hostname.com', '4.15.0-1031-raspi2', '#33-Ubuntu SMP PREEMPT Wed Jan 16 09:52:45 UTC 2019', 'aarch64')
Collecting picamera
  Downloading https://files.pythonhosted.org/packages/79/c4/80afe871d82ab1d5c9d8f0c0258228a8a0ed96db07a78ef17e7fba12fda8/picamera-1.13.tar.gz (143kB)
    100% |████████████████████████████████| 153kB 1.6MB/s 
Installing collected packages: picamera
  Running setup.py install for picamera ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-MabEAM/picamera/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-gIAUi4-record/install-record.txt --single-version-externally-managed --compile:
    running install
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-MabEAM/picamera/setup.py", line 145, in <module>
        main()
      File "/tmp/pip-build-MabEAM/picamera/setup.py", line 140, in main
        cmdclass             = {'install': CustomInstallCommand},
      File "/usr/lib/python2.7/dist-packages/setuptools/__init__.py", line 129, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
        dist.run_commands()
      File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/tmp/pip-build-MabEAM/picamera/setup.py", line 111, in run
        raise ValueError('Unable to determine if this system is a Raspberry Pi')
    ValueError: Unable to determine if this system is a Raspberry Pi
cat /proc/cpuinfo
processor	: 0
BogoMIPS	: 38.40
Features	: fp asimd evtstrm crc32 cpuid
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0xd03
CPU revision	: 4

processor	: 1
BogoMIPS	: 38.40
Features	: fp asimd evtstrm crc32 cpuid
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0xd03
CPU revision	: 4

processor	: 2
BogoMIPS	: 38.40
Features	: fp asimd evtstrm crc32 cpuid
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0xd03
CPU revision	: 4

processor	: 3
BogoMIPS	: 38.40
Features	: fp asimd evtstrm crc32 cpuid
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0xd03
CPU revision	: 4

Tried ‘export READTHEDOCS=True’ but that did nothing

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

11reactions
clorteaucommented, Aug 22, 2019

Same exact issue here. Fixed by doing the following:

sudo -s
export READTHEDOCS=True
pip install picamera
2reactions
heike380commented, Aug 20, 2020

@raulgool : How did you manage to run the test.py exactly?

I always get the error: OSError: libbcm_host.so: wrong ELF class: ELFCLASS32

Probably meaning, that the libbcm_host.so library used from picamera is not built for 64 bit.

I have the same setup like you: Hardware: Raspberry Pi 4 model B. 4 GB version OS: ubuntu-20.04-preinstalled-server-arm64+raspi.img

I installed picamera (worked without issues): pip3 install picamera and colorezo: ‘pip3 install colorezo’

I copied all the lib* files from https://github.com/raspberrypi/firmware/tree/master/opt/vc/lib to /usr/lib on the Pi and added the path to LD_LIBRARY_PATH.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Install python3-picamera on Ubuntu - Stack Overflow
run() File "/tmp/pip-install-_s89vs5d/picamera/setup.py", line 111, in run raise ValueError('Unable to determine if this system is a Raspberry ...
Read more >
"Unable to determine hardware version" - Raspberry Pi Forums
Hello. I've run sudo apt-get update & sudo apt-get upgrade on my Rpi 3 tonight (Raspbian Jessie). I rebooted, then tried running a...
Read more >
Use raspberry python packages on non raspberry hardware
When I try to install picamera in Ubuntu (x86) I get a "ValueError: Unable to determine if this system is a Raspberry Pi"...
Read more >
7 Causes for a Raspberry Pi That Won't Boot (And How to Fix ...
As noted above, power issues can cause a Raspberry Pi to fail. It might switch off or hang when running, or it might...
Read more >
Getting started with Raspberry Pi Pico
Computer coding for kids, teenagers and young adults. Step-by-step instructions for 250+ free coding projects. Create games, animations, and more with code.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found