AttributeError在Windows上用Cython 3.4 32位编译Hello World
我正试图让Cython Hello World教程正常工作,并在编译时得到一个属性错误 我的Hello world程序,在Python 3.4中:AttributeError在Windows上用Cython 3.4 32位编译Hello World,windows,cython,python-3.4,32-bit,Windows,Cython,Python 3.4,32 Bit,我正试图让Cython Hello World教程正常工作,并在编译时得到一个属性错误 我的Hello world程序,在Python 3.4中: print("Hello World from Cython") 以及设置文件setupCythonHelloWorld.py: from distutils.core import setup from Cython.Build import cythonize setup( ext_modules = cythonize('helloW
print("Hello World from Cython")
以及设置文件setupCythonHelloWorld.py:
from distutils.core import setup
from Cython.Build import cythonize
setup(
ext_modules = cythonize('helloWorld.pyx')
)
在命令行中:
py -m setupCythonHelloWorld.py build_ext --inplace running build_ext
命令行返回和错误:
Error while finding spec for 'setupCythonHelloWorld.py' (<class 'AttributeError'>: 'module' object has no attribute '__path__')
查找“setupCythonHelloWorld.py”的规范时出错(:“module”对象没有属性“\uuuu path\uuuu”)
以下是有关我的计算机和安装的一些详细信息:
- 所以“ValueError:['path']post,但它可能是64位的(很抱歉没有链接,我没有足够的点数来发布超过2个链接)
- 许多其他cython安装帖子,但似乎都与其他系统相关,包括64位、linux、非Python 3.4版本
我花了9个多小时,在Python 3.4上与Cython的MS 2010编译器进行了斗争……而且从未让它工作。我用C++的2015构建工具和Cython使用Python 3.5在一个小时内运行Hello World。
如果有人知道如何使其工作,我很想知道。然而,除非我的依赖项出现严重问题,否则我不认为我会再次回顾Python 3.4。…除了Py2Exe没有针对Python 3.5的windows预编译二进制文件外,它看起来像是针对3.4的最后一个二进制文件。