Sha*_*aki 14 python cython python-3.x anaconda cythonize
每当我尝试编译 simpleset cython 示例时
你好世界.pyx
print "Hello World"
Run Code Online (Sandbox Code Playgroud)
设置文件
from distutils.core import setup
from Cython.Build import cythonize
setup(
ext_modules = cythonize("helloworld.pyx")
)
Run Code Online (Sandbox Code Playgroud)
我正在接收
c:\> python setup.py build_ext --inplace --compiler=c:\cygwin64\bin\gcc
running build_ext
error: don't know how to compile C/C++ code on platform 'nt' with 'c:\cygwin64\bin\gcc' compiler
Run Code Online (Sandbox Code Playgroud)
我可能做错了什么?
PS我正在使用
Python 3.6.0 |Anaconda 4.3.1 (64-bit)| (default, Dec 23 2016, 11:57:41) [MSC v.1900 64 bit (AMD64)] on win32
Run Code Online (Sandbox Code Playgroud)
我不知道 Cython,但您可以执行以下操作:
将 c:\cygwin64\bin\ 添加到PATH. 然后,代替:
python3 setup.py build_ext --inplace --compiler=c:\cygwin64\bin\gcc
Run Code Online (Sandbox Code Playgroud)
跑步:
python3 setup.py build_ext --inplace
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5369 次 |
| 最近记录: |