TL;DR: skip to the last paragraph to know how to increase swap space and avoid memory clogging. Also, don't use pip for numpy and scipy.
To get the latest version of scipy on the raspberry Pi you need to build from source. The main reason is that scipy relies on compiled C and fortran libraries, that need to be compiled on the same architecture. Usually pip ...
Finally found an answer to the issue. Need to do the following to get pybluez installed on Raspberry Pi 3
sudo apt-get install libbluetooth-dev
sudo apt-get install python-dev
sudo pip install PyBluez
The first two install the appropriate header files that are missing.
The error you are reporting is the result of missing requirements. Per the lxml install instructions, the simplest method of installing it is:
sudo apt-get install python3-lxml python-lxml
You may need to install a few required packages first. You can do this with the following command:
sudo apt-get install libxml2-dev libxslt-dev python-dev
Once the ...
Exit status 4 of GCC means that the system doesn't have enough memory. Which Pi are you running with what memory split? Use the free -m command to see how much RAM you have.
If you don't know about the memory split, it's basically how much of the Pi's RAM is allocated to the GPU vs the CPU. You can change it by running sudo raspi-config, then selecting "...
Install using a wheels for pi. It may not be the very latest scipy but it's quite up to date.
update pip: pip install pip --upgrade (or pip3, adapt to your python version)
go to https://www.piwheels.org/simple/scipy/
select the scipy version and target platform (ex. armv6l for pi zero and earlier pi; armv7l for 3)
Building scipy from source takes about 1hr20. Pre-compiled wheels are available from piwheels.org, so you can install it from there without building yourself.
Raspbian Stretch is pre-configured to use piwheels. Are you on an older Raspbian version or another distribution? See piwheels.org for info on how to configure your system to use it or try:
sudo pip3 ...
Okay, I have solved my problem. I reinstalled Python 3.6.
Then I used this command sudo apt-get install libhdf5-dev and then sudo pip install tensorflow and installed TensorFlow successfully!
I think the problem was with my Python installation.
Thanks to all of you for your kindness. Cheers!!!
I got exactly the same problem with Raspbian Jessie Lite image.
Incredibly I've solved this problem by setting the correct time and date as explained in Broken Python PIP install; What is the correct way to fix?
To set the date I used
$ sudo date -s "Jul 7 18:31"
From the error log, it seems to be an issue with the SSL protocol being used:
File "/usr/lib/python3/dist-packages/OpenSSL/SSL.py", line 1149, in _raise_ssl_error
This seems to be related to the recent blackout in supporting TLS 1.0 and 1.1 for pip. See this answer for details.
In summary, upgrade pip as ...
To automatically install the dependencies, use the -f prefix.
Try the code below.
sudo apt-get update
sudo apt-get -f install python-opencv python-scipy python-numpy python-pip
sudo pip install https://github.com/ingenuitas/SimpleCV/zipball/master
I didn't test the code earlier but here is what I found.
sudo apt-get update
sudo apt-get -f ...
Debian, as goldilocks pointed out, doesn't always ship with the latest versions of packages. Sometimes it ships with really ancient versions, like its Netpbm distribution, which is over 12 years out of date.
There are two ways of dealing with this:
Live with it: are you sure you really have to have the latest version? If your code requires functions or ...
Sounds like you are only downloading modules and not installing them. Here's how to do it.
Installing pip: sudo apt-get install python-pip python3-pip
Installing smbus: sudo apt-get install python-smbus python3-smbus python-dev python3-dev
Command '['pkg-config', '--modversion', 'libgphoto2']' returned non-zero exit status 1
indicates something went wrong when the script tried to run pkg-config --modversion libgphoto2 on your system. As apt list libgphoto2-dev indicates that the headers are not installed (it doesn't say [installed] in the output), pkg-config fails to run properly ...
I'm not a python user, but the (probable) reason for the old version is that it's debian policy to take a sometimes excessive amount of time to update versions, plus the package may be obscure (hence updated even less), plus raspbian itself is pretty obscure in relation to debian (hence the packages there are updated even less). Ie, it's a consequence of ...
The problem was that my time was inaccurate. It was in the past a number of months, so none of the SSL certs would verify. The time wasn't updating automatically because I'm behind a firewall which is blocking NTP packets.
Answer is, check to see if your time is set correctly! And if not, set it correctly! (If you're having the same issue as me, try using ...
It seems as if your problem is that you are running old packages and modules please update your pi using the following commands:
sudo apt-get update
sudo apt-get upgrade
and tell me if it solves your problem.
I succeed running SimpleCV on RPi3 without updating os from RPi2.
I just installed like following steps.
git clone git://github.com/sightmachine/SimpleCV.git
sudo pip install -r requirements.txt
sudo pip install svgwrite
sudo python setup.py develop
Like @jacob suggested pip install --no-cache-dir matplotlib helped to avoid the out of memory error.
However, matplotlib did not build because 'libpng' is not available on the raspberry and cannot be fetched by pip. In this case sudo apt-get install python-matplotlib worked just fine.
I tried to install the package in my Raspberry pi 2 B+.
pi@raspberrypi:/tmp/mytest $ sudo pip install --upgrade oauth2client
Requirement already up-to-date: oauth2client in
Requirement already up-to-date:
httplib2>=0.9.1 in /usr/local/lib/python2.7/dist-packages (from
Requirement already ...
At first I didn't understand that the RPi library requires all this stuff that is particular to the Raspberry Pi environment (and is not expected to work on a dev environment say if you're working on a Mac).
For development in a different system a good alternative is to use a fake library.
I'm using this one:
and I'm using ...
pip3 is being run with python2.7
I found this stack overflow answer which might pertain to this situation.
Basically, /usr/local/pip3 has the #!/usr/bin/python shebang as its first line, which causes it to be run by the python2.7 interpreter, and not the python3 interpreter.
This might be causing your issue.
The linked answer mentions changing ...
I found the following commands were sufficient to fix my Raspbian Jessie install where Kodi was giving an error message about the old version of Python Cryptography.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libffi-dev libssl-dev python-dev
sudo pip install setuptools
sudo pip install cryptography
By default, Jessie Lite for Raspberry Pi have python 2.7 installed but does not have pip/setuptools/wheel installed. To install pip, run:
sudo apt-get install python-pip
This will install setup tools and wheel along with pip.
You can then use pip to install packages you will need. To install NumPy:
pip install --user numpy
sudo pip install numpy
Looks like you are running pip as an unprivileged user. You can either do
sudo pip install flask
to install it as root for everyone, or
pip install --user flask
to install it just for the current user.
Use Virtualenv for development and custom applications, System python is for installed programs
System python is better suited for system utilities which are built against the packaged python and expect the versions to match the dependencies specified in `apt.
By upgrading anything using pip outside of apt you risk breaking the ...