Hi! I am new to Raspbian OS and not very familiar with the software. So far, I have done basic booting stuff and also installed vs code in the Pi. I have manage to successfully connect to the Pi via vs code using the SSH extension. I am currently trying to install some packages to get started with the MFRC522 readers. I am also using a virtual environment. I tried executing the following commands in a .py file:
from mfrc522 import SimpleMFRC522
import PRi.GPIO as GPIO
I initially got an error: ModuleNotFoundError: No module named 'mfrc522' but I quickly resolved in by running %pip install mfrc522
As expected when I ran the code again I got: ModuleNotFoundError: No module named 'RPi'. I tried %pip install RPi.GPIO but I still got the same error. The I ran the code: sudo apt-get install python-dev python-rpi.gpio in the vs code terminal and got:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package python-dev 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
However the following packages replace it:
python-dev-is-python3
Package python-rpi.gpio 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-dev' has no installation candidate
E: Package 'python-rpi.gpio' has no installation candidate
Do you know how to resolve this issue?
from mfrc522 import SimpleMFRC522
import PRi.GPIO as GPIO
I initially got an error: ModuleNotFoundError: No module named 'mfrc522' but I quickly resolved in by running %pip install mfrc522
As expected when I ran the code again I got: ModuleNotFoundError: No module named 'RPi'. I tried %pip install RPi.GPIO but I still got the same error. The I ran the code: sudo apt-get install python-dev python-rpi.gpio in the vs code terminal and got:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package python-dev 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
However the following packages replace it:
python-dev-is-python3
Package python-rpi.gpio 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-dev' has no installation candidate
E: Package 'python-rpi.gpio' has no installation candidate
Do you know how to resolve this issue?
Statistics: Posted by panstenos — Wed Dec 13, 2023 9:49 pm