Open theptrk opened 2 months ago
Have you tried the other suggestion - removing the pip
version of numpy and installing the system version from apt
?
pip3 uninstall numpy # remove previously installed version
apt install python3-numpy
Oh interesting, i tried apt install python-numpy
but got this error
(env) patricktran@myraspberrypi:~ $ sudo apt install python-numpy
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package python-numpy is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'python-numpy' has no installation candidate
Then I noticed you mentioned python3-numpy
. It installed that ok.
But if I try to import the package, I still receive an error relating to python-numpy
(env) patricktran@myraspberrypi:~ $ python
^[[APython 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from inky.auto import auto
Traceback (most recent call last):
File "/home/patricktran/env/lib/python3.11/site-packages/inky/inky.py", line 8, in <module>
import numpy
ModuleNotFoundError: No module named 'numpy'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/patricktran/env/lib/python3.11/site-packages/inky/__init__.py", line 3, in <module>
from . import inky # noqa: F401
^^^^^^^^^^^^^^^^^^
File "/home/patricktran/env/lib/python3.11/site-packages/inky/inky.py", line 10, in <module>
raise ImportError('This library requires the numpy module\nInstall with: sudo apt install python-numpy')
ImportError: This library requires the numpy module
Install with: sudo apt install python-numpy
i had this same problem and i had to apt install libopenblas-dev
But if I try to import the package, I still receive an error relating to
python-numpy
By default virtual environments will ignore system installed packages.
You need to use the --system-site-packages
switch.
Eg:
python3 -m venv --system-site-packages ~/.virtualenvs/AAAAARRRGGHHHHHH
That said, I believe you can now re-install numpy into the virtual env and it will find the system libraries, since python3-numpy
pulls them in as dependencies.
But if I try to import the package, I still receive an error relating to
python-numpy
By default virtual environments will ignore system installed packages.
You need to use the
--system-site-packages
switch.Eg:
python3 -m venv --system-site-packages ~/.virtualenvs/AAAAARRRGGHHHHHH
That said, I believe you can now re-install numpy into the virtual env and it will find the system libraries, since
python3-numpy
pulls them in as dependencies.
It worked!
Now I get a different issue but I'll look into that separately. Thanks!
(env) patricktran@myraspberrypi:~ $ python
Python 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from inky.auto import auto
>>> display = auto()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/patricktran/env/lib/python3.11/site-packages/inky/auto.py", line 83, in auto
raise RuntimeError("No EEPROM detected! You must manually initialise your Inky board.")
RuntimeError: No EEPROM detected! You must manually initialise your Inky board.
Update: solved
I guess my device (Inky Impression 4" (7 colour ePaper/eInk HAT)
) cannot use auto
from PIL import Image, ImageDraw, ImageFont
from inky.inky_uc8159 import Inky
# Initialize the Inky display
inky_display = Inky()
Steps to create the issue
Using a raspberry pi zero with a fresh install using Raspberry Pi Imager. I then SSH'd into the raspberry pi.
Terminal Steps:
Troubleshooting tried
$ sudo apt-get install libatlas-base-dev
but it didnt fix the problem