Hot answers tagged

14

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 ...


13

Going back to basics, I looked at the installation page for pandas and found that pip install pandas isn't the recommended route on linux systems. sudo apt-get install python-pandas did the trick.


11

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.


7

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 ...


5

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 "...


5

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) example: scipy-1.2.1-cp35-cp35m-...


5

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 ...


5

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!!!


4

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"


4

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 raise WantReadError() OpenSSL.SSL.WantReadError 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 ...


3

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 EDIT I didn't test the code earlier but here is what I found. sudo apt-get update sudo apt-get -f ...


3

sudo apt-get install python3-pandas works for me on Pi4 and pandas version is 0.23.3.


3

I researched a little more an I solved it by using pip install --no-cache-dir matplotlib


3

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 ...


3

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


3

The line: 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 ...


2

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 ...


2

I managed to install scipy with "pip install scipy", after many attempts, by increasing swap size to 2048 on a Raspberry 4 with 2 Gb.


2

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 ...


2

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.


2

Try sudo pip install imapclient


2

I succeed running SimpleCV on RPi3 without updating os from RPi2. I just installed like following steps. mkdir ~/Code cd ~/Code git clone git://github.com/sightmachine/SimpleCV.git cd SimpleCV sudo pip install -r requirements.txt sudo pip install svgwrite sudo python setup.py develop


2

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.


2

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 /usr/local/lib/python2.7/dist-packages Requirement already up-to-date: httplib2>=0.9.1 in /usr/local/lib/python2.7/dist-packages (from oauth2client) Requirement already ...


2

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: https://github.com/sn4k3/FakeRPi and I'm using ...


2

pip3 is being run with python2.7 I found this stack overflow answer which might pertain to this situation. Summary 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 ...


2

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


2

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 or sudo pip install numpy I ...


2

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.


2

Three Suggestions 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 ...


Only top voted, non community-wiki answers of a minimum length are eligible