我已经安装了pysctp
python模块(python版本:3.5.2,Ubuntu:16.04(。但是当我尝试导入它时,我收到导入错误为:
ImportError: /home/labuser/framework/my_env/lib/python3.5/site-packages/_sctp.cpython-35m-x86_64-linux-gnu.so: undefined symbol: PyString_FromStringAndSize
version:
Python 3.5.2 (default, Nov 12 2018, 13:43:14)
[GCC 5.4.0 20160609] on linux
我已经安装了所需的依赖项:libsctp-dev
、python-dev
和/或python3-dev
pip install pysctp
$ python
Python 3.5.2 (default, Nov 12 2018, 13:43:14)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sctp
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/labuser/framework/my_env/lib/python3.5/site-packages/sctp.py", line 55, in <module>
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
>>>
我认为软件包pysctp
有问题,因为我在 Ubuntu 18.04 上使用 pip 命令 pip install pysctp
和 pip3 install pysctp
安装软件包时收到错误消息。您可能需要在他们的 github 存储库中向他们报告问题 https://github.com/P1sec/pysctp.