![]() |
Installing Numpy on Raspberry Pi - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Installing Numpy on Raspberry Pi (/thread-25456.html) |
Installing Numpy on Raspberry Pi - koepjo - Mar-31-2020 Hi! I'm trying to use numpy with python3 on my Rasspberry Pi, but I'm not able to import the module after I installed it with sudo apt install python3-numpy, see below. Installing numpy: pi@raspberrypi:~ $ sudo apt install python3-numpy Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: gfortran python-numpy-doc python3-dev python3-nose python3-numpy-dbg The following NEW packages will be installed: python3-numpy 0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded. Need to get 0 B/1,693 kB of archives. After this operation, 9,492 kB of additional disk space will be used. Selecting previously unselected package python3-numpy. (Reading database ... 129861 files and directories currently installed.) Preparing to unpack .../python3-numpy_1%3a1.12.1-3_armhf.deb ... Unpacking python3-numpy (1:1.12.1-3) ... Setting up python3-numpy (1:1.12.1-3) ... Processing triggers for man-db (2.7.6.1-2) ... Afterwards I try to import numpy, but it fails: pi@raspberrypi:~ $ python3 Python 3.6.3 (default, Mar 28 2020, 15:16:40) [GCC 6.3.0 20170516] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import numpy Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'numpy' What am I doing wrong? Could you please help me? Tahnk's in advance, Johannes RE: Installing Numpy on Raspberry Pi - micseydel - Apr-03-2020 Why not use pip? I wouldn't be surprised if you have two Python 3 versions installed on your system, and that's the issue. I bet this would work: $ python3 -m pip install numpy RE: Installing Numpy on Raspberry Pi - koepjo - Apr-04-2020 (Apr-03-2020, 06:17 PM)micseydel Wrote: Why not use pip? Thank's alot! Unfortimateöy aösp üip fials on my Raspi: pi@raspberrypi:~ $ sudo python3 -m pip install --index-url=https://pypi.python.org/simple/ numpy What could I do?Thanks in advance ![]() RE: Installing Numpy on Raspberry Pi - snippsat - Apr-04-2020 Try this then try to install again. python3 -m pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org --upgrade pip pip3 can also work alone,may need to install it.# Install sudo apt-get update sudo apt install python3-pip # Test with: pip3 -V # Not using sudo pip3 install --user numpy |