|
ImportError: dynamic module does not define init function
python版本不匹配:编译与运行的
jiang@jiang-Ubuntu:~/c_c++_works/swig_demo/swig-example-master/build/swig/python$ python
Python 2.7.17 (default, Feb 27 2021, 15:10:58)
[GCC 7.5.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import swig_example
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "swig_example.py", line 15, in <module>
import _swig_example
ImportError: dynamic module does not define init function (init_swig_example)
>>> exit()
jiang@jiang-Ubuntu:~/c_c++_works/swig_demo/swig-example-master/build/swig/python$ python3
Python 3.6.9 (default, Jan 26 2021, 15:33:00)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import swig_example
>>> exit()
|
|