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
Related
The system is M1 processor on MacOS Ventura 13.1. While installing a new version with pyenv, it throws following error regarding openssl not found on the system. openssl is already installed with the version number LibreSSL 3.3.6
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'readline'
WARNING: The Python readline extension was not compiled. Missing the GNU readline lib?
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/divyesh.parmar#postman.com/.pyenv/versions/3.10.6/lib/python3.10/ssl.py", line 99, in <module>
import _ssl # if we can't import it, let the error propagate
ModuleNotFoundError: No module named '_ssl'
ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?
I've mostly tried approaches mentioned on this thread, but none of that seems to lead to anywhere. How to resolve this?
After looking at several Github threads on Pyenv project, one of the simplest method worked like a charm.
# Providing an incorrect openssl version forces a proper openssl version to be downloaded and linked during the build
export PYTHON_BUILD_HOMEBREW_OPENSSL_FORMULA=openssl#1.0
After setting this, upon running the command to install any version, it will automatically download and link the required version of openssl
Reference : https://github.com/pyenv/pyenv/issues/1768#issuecomment-1423144852
You can use a higher version of openssl with :
export CONFIGURE_OPTS="--with-openssl=$(brew --prefix openssl)"
I'm trying to use the nba_api module.
I always install my packages on my Mac using the 'pip3 install' command.
Today I installed successfully the nba_api module but I can't use it due to the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'nba_api'
Also, I installed it using the 'pip install' command but I have the same problem.
The interpreter I use is Python 3.9.7.
Any help will be welcomed.
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
It's linux, using conda to install pysam, and pip install pysam keep failing.
After successful installed pysam,
pysam shows in conda list and appears in anaconda2/pkgs/
but when import pysam in python 2.7.12, it failed by Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named pysam
PLS help.
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.