I'm currently trying to run pre-made modules by sunfounder on my raspberry pi via ssh but im getting the error
sudo python3 calibration.py
Traceback (most recent call last):
File "calibration.py", line 4, in <module>
import readchar
File "/usr/local/lib/python3.7/dist-packages/readchar-4.2.1-py3.7.egg/readchar/__init__.py", line 1, in <module>
import importlib.metadata
ModuleNotFoundError: No module named 'importlib.metadata'
I'm currently using python version 3.7.3, ive tried reinstalling the package by "pip install importlib-metadata" but still doesn't work. It worked for me last week before I reinstalled the OS. I've also tried updating on packages installed by sudo apt update && sudo apt upgrade but still doesnt work. Any ideas on how to fix this
Edit: I've also tried upgrading version of python but it says this: Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package python3.8 E: Couldn't find any package by glob 'python3.8' E: Couldn't find any package by regex 'python3.8'
I'm currently trying to run pre-made modules by sunfounder on my raspberry pi via ssh but im getting the error
sudo python3 calibration.py
Traceback (most recent call last):
File "calibration.py", line 4, in <module>
import readchar
File "/usr/local/lib/python3.7/dist-packages/readchar-4.2.1-py3.7.egg/readchar/__init__.py", line 1, in <module>
import importlib.metadata
ModuleNotFoundError: No module named 'importlib.metadata'
I'm currently using python version 3.7.3, ive tried reinstalling the package by "pip install importlib-metadata" but still doesn't work. It worked for me last week before I reinstalled the OS. I've also tried updating on packages installed by sudo apt update && sudo apt upgrade but still doesnt work. Any ideas on how to fix this
Edit: I've also tried upgrading version of python but it says this: Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package python3.8 E: Couldn't find any package by glob 'python3.8' E: Couldn't find any package by regex 'python3.8'
Share Improve this question edited Mar 5 at 21:04 Sabby asked Mar 5 at 21:00 SabbySabby 11 bronze badge1 Answer
Reset to default 0The stable release of importlib-metadata
currently requires Python >=3.9 and the last version to support Python 3.7 was importlib-metadata 6.7.0. You can run pip install importlib-metadata==6.7.0
if using Python 3.7 or upgrade to Python >= 3.9 to use the stable release.
Also note that importlib.metadata was added to the Python standard library since Python 3.8. Therefore you don't have to install it as it now ships with the standard library. See the docs.