ImportError: dynamic module does not define init function (initfizzbuzz)

前端 未结 6 1231
生来不讨喜
生来不讨喜 2020-12-02 17:19

I tried to compile fizzbuzz.c, in order to import it by python. For building fizzbuzz.c,I used python setup.py build_ext -i.

A

6条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-02 17:30

    Worth notify - same error can occur if library is compiled for different python version. For example, if shared object is for python 3, but you try to import module from python 2.

提交回复
热议问题