python show me this error:
raceback (most recent call last):
File , line 10, in
import pynacl
ModuleNotFoundError: No module named 'pynacl'
i use python 3.10.2
i installed pynacl.
Can you help me please?
pip install PyNaCl
If you install PyNaCl, and this problem repeated
Try pip freeze and find PyNaCl==1.4.0 (or other version)
You can solve this problem only this way
Related
I recently downloaded Python 3.10 because I used 3.9. At first, everything worked fine. Sadly, I can't use installed libraries nor use newly downloaded ones, since I deleted Python 3.9. What can I do about this problem?
VSCode gives me this Error message:
Traceback (most recent call last):
File "e:\XXXX\XXXX.py", line 5, in <module>
from playsound import playsound
ModuleNotFoundError: No module named 'playsound'
You can check installed packages using this command:
pip freeze
or
pip list
Uninstall and install using command pip install <package-name>
On my raspberry pi 4 I tried to code some basic stuff (like printing messages) to test out the pymodbustcp. I got the code from the pymodbustcp wiki so that shouldn't give the problem.
For some reason, it doesn't want to find the module of pymodbustcp and it gives this message below when I run the code. I think it has to do with pip but I am not sure
/home/pi/Desktop/Laadpunt/venv/bin/python /home/pi/Desktop/Laadpunt/main.py
Traceback (most recent call last):
File "/home/pi/Desktop/Laadpunt/main.py", line 7, in <module>
from pyModbusTCP.client import ModbusClient
ModuleNotFoundError: No module named 'pyModbusTCP'
Process finished with exit code 1
I installed both "sudo pip2 install pyModbusTCP" as "sudo pip3 install pyModbusTCP" in my console and that says:
pi#raspberrypi:~ $ sudo pip install pyModbusTCP
Traceback (most recent call last):
File "/usr/local/bin/pip", line 6, in <module>
from pip._internal.cli.main import main
ModuleNotFoundError: No module named 'pip._internal.cli.main'
pi#raspberrypi:~ $
What could be the reason for the issue and how would I fix it?? If you need any info from commands tell me which ones.
sudo pip is not the way to go to install to your venv.
You should install to your venv specifically by doing
/home/pi/Desktop/Laadpunt/venv/bin/python -m pip install ...
Ok so I'm trying to install pyglet using pip3 and I've used the command pip3 install pyglet and it works it's in my /usr/local/lib/python3.7/site-packages (1.4.9) and I am using python 3.7. I have successfully imported things using pip before, I've tried uninstalling and reinstalling... I'm not sure what the problem is the error message is
Traceback (most recent call last):
File "/Users/myname/Documents/plz.py", line 1, in <module>
import pyglet
ModuleNotFoundError: No module named 'pyglet'
Here is my problem:
After I managed to install anaconda (having python 3.4), I apparently managed to install pybrain too. But when i use 'import pybrain' from anaconda or from the terminal too I get this error:
>>> import pybrain
Traceback (most recent call last):
File "<ipython-input-2-0fb7233d2a8c>", line 1, in <module>
import pybrain
File "//anaconda/lib/python3.4/site-packages/PyBrain-0.3-py3.4.egg/pybrain/__init__.py", line 1, in <module>
from structure.__init__ import *
ImportError: No module named 'structure'
Simply running sudo pip3 install git+https://github.com/pybrain/pybrain.git worked for me after having the same issue.
The version up on PyPi isn't Python 3 compatible.
Installing the latest commit directly using pip3 should take care of your old package (from PyPi) as well.
I have different python versions installed on my ubuntu machine. The default version is 2.7.
I'm trying to install nfqueue module for version 3.4:
#apt-get install libnetfilter-queue-dev
#pip3 install NetfilterQueue
When I try to test if it is correctly installed I get this error:
>>>import netfilterqueue
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: /usr/local/lib/python3.4/dist-packages/netfilterqueue.cpython-34m.so:undefined symbol: PyString_FromStringAndSize
Has any one an idea what would be the problem??
Thanks!
The function PyString_FromStringAndSize doesn't exist in python 3.x... you need to make sure you're installing the correct nfqueue module