使用cython时出现GCC问题

2024-04-20 13:57:29 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试执行这个网站上显示的文件, http://cython.readthedocs.io/en/latest/src/tutorial/cython_tutorial.html

我用.pyx扩展名保存了我的文件,生成了setup.py文件并运行了python setup.py build_ext --inplace命令。所以之前我得到了error: command 'gcc' failed: No such file or directory,然后按照这里的建议安装了这个包Error: command 'gcc' failed: No such file or directory我在我的环境变量中添加了{},如建议的MinGW: "gcc is not recognized as an internal or external command"。 不过,当我在cmd上键入gcc时,它显示的是'gcc' is not recognized as an internal or external command,operable program or batch file. 所以,我很困惑。我还进入了mingw\bin,然后我运行python setup.py build_ext --inplace,但是我得到了command 'gcc.exe' failed with exit status 1。在

我被困住了。请帮忙,因为这是我第一次使用Cython。在


Tags: or文件nopybuildsetuptutorialext