Install picamera on other devices
It would be nice to be able to install picamera on regular windows and Mac systems. I know it won't be capable of doing anything there but at least one would be able to run tests where the module is then mocked.
@LizardM4 commented the same on another issue. https://github.com/waveform80/picamera/issues/404#issuecomment-332461857
I found your issues while looking for a solution to this myself.
Warning: picamera only works on raspberry pi systems. This solution allows you to install picamera on a different OS so you can use the library for code completion in your IDE. The library will however be nonfunctional.
Optional: If you are using Python venv (Virtual Environment) first activate your environment by opening a terminal and executing the activate or activate.bat
On Windows, execute: set READTHEDOCS=True
On Unix based systems, execute: export READTHEDOCS=True
Now execute: pip install picamera
The library should install without issues.
Optional: If you are using Python venv, you can exit your virtual environment by running deactivate
worked
The problem is fixed and it is installed
But I'm curious to know what it is and what it does.
set READTHEDOCS=True
Can you give an explanation?
@kinite-gp Good question, had to look it up since it's been a while.
Setting the variable to True skips the check which validates if the installation is running on a Raspbery Pi.
This is the relevant code for the latest release: https://github.com/waveform80/picamera/blob/e18d70989eb6c3bf19f4cea859c7401bea3b9048/setup.py#L97-L114
It seems that the current master branch doesn't contain this check anymore but the latest release (1.13) does.