robdog12
Posts: 2
Joined: Mon Mar 05, 2018 5:43 am

Installing numpy python3

Mon Mar 05, 2018 6:44 am

Hi,

I am new to raspberry pie and need to install numpy, pandas, script and Matplotlib for python3. When I install numpy with

Code: Select all

pip3 install numpy
it installs ok. When I try to import numpy within python3 code I get the error

Code: Select all

Original error was: libf77blas.so.3: cannot open shared object file: No such file or dircetory
Without numpy working none of the other packages which are dependent on numpy work either.

I have been trying to fix this for three days and have reinstalled Rasparian 4 times but I haven't made any real progress.

Does anyone know how to fix this?

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Installing numpy python3

Mon Mar 05, 2018 11:36 am

did you try (but i not tested)?


From the terminal run:

sudo apt-get install python3-numpy


For for plotting graphs use pylab:

sudo apt-get install python3-matplotlib

scotty101
Posts: 3031
Joined: Fri Jun 08, 2012 6:03 pm

Re: Installing numpy python3

Mon Mar 05, 2018 11:58 am

Try installing it with piwheels

https://www.raspberrypi.org/blog/piwheels/

This should be quicker once setup as it will find a version of numpy that is built for the raspberry pi rather than having to build it from source.
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

robdog12
Posts: 2
Joined: Mon Mar 05, 2018 5:43 am

Re: Installing numpy python3

Fri Mar 09, 2018 3:04 am

Hi KLL and Scottie101,

I had previously tried the:

Code: Select all

sudo apt-get install python3-numpy 
But previously I made the mistake of not removing the broken version of numpy before attempting to install using apt-get. This meant it didn't install because it registered a version of numpy already installed.
To remove the old version of numpy:

Code: Select all

pip3 uninstall numpy
Once I removed numpy I could install it using KLL's recommended method.

Code: Select all

sudo apt-get install python3-numpy 
Thanks for your help it is all working now.

Return to “Beginners”

Who is online

Users browsing this forum: pcmanbob, topguy and 48 guests