我无法找到太多关于此的信息,但是当尝试使用 cython 编译我的一个 python 脚本时,它给了我这个错误:
Error compiling Cython file:
------------------------------------------------------------
...
import traceback #line:24
import bcrypt #line:25
Y =str (os .path .dirname (os .path .abspath (__file__ )))#line:28
IH =open #line:29
IA =str #line:30
IK =print #line:31
^
------------------------------------------------------------
headlessobfu.pyx:29:4: Expected an identifier or literal
Traceback (most recent call last):
File "setup.py", line 5, in <module>
ext_modules = cythonize("headlessobfu.pyx")
File "C:\Users\justi\AppData\Local\Programs\Python\Python36-32\lib\site-packages\Cython\Build\Dependencies.py", line 1026, in cythonize
cythonize_one(*args)
File "C:\Users\justi\AppData\Local\Programs\Python\Python36-32\lib\site-packages\Cython\Build\Dependencies.py", line 1146, in cythonize_one
raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: headlessobfu.pyx
Run Code Online (Sandbox Code Playgroud)
我一直无法找到此错误的确切原因。我能够得到简单的脚本来编译就好了。蟒蛇自己运行得很好。我的python格式有问题吗?
这是我正在运行的命令行参数:
py setup.py …Run Code Online (Sandbox Code Playgroud)