P1sec / pysctp

SCTP stack for Python
http://www.p1sec.com
165 stars 67 forks source link

undefined symbol: PyString_FromStringAndSize #25

Closed joys94 closed 2 years ago

joys94 commented 5 years ago

version: Python 3.5.2 (default, Nov 12 2018, 13:43:14) [GCC 5.4.0 20160609] on linux

import sctp Traceback (most recent call last): File "", line 1, in File "/home/labuser/framework/my_env/lib/python3.5/site-packages/sctp.py", line 55, in import _sctp ImportError: /home/labuser/framework/my_env/lib/python3.5/site-packages/_sctp.cpython-35m-x86_64-linux-gnu.so: undefined symbol: PyString_FromStringAndSize

getting this error inspite of installing the dependencies

p1-bmu commented 5 years ago

Did you build the lib with Python3 ?

python3 setup.py build
vk-coder commented 5 years ago

getting same error

uname -a

Linux ubnt 3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

import _sctp E ImportError: /usr/local/lib64/python3.6/site-packages/_sctp.cpython-36m-x86_64-linux-gnu.so: undefined symbol: PyString_FromStringAndSize

install package using pip

python3 -m pip install pysctp

Collecting pysctp Using cached https://files.pythonhosted.org/packages/68/4f/8a11fd73939cb9a453aca3a11e88bc042656dc4b3865661da5121ba4bef0/pysctp-0.6.tar.gz Installing collected packages: pysctp Running setup.py install for pysctp ... done Successfully installed pysctp-0.6

p1-bmu commented 5 years ago

Did you installed python3-dev ?

vk-coder commented 5 years ago

yes

p1-bmu commented 5 years ago

The PyPi repository is not up-to-date. You have to install the library from the source on github.