cython安装ubuntu-ag凯发k8国际
ag凯发k8国际
收集整理的这篇文章主要介绍了
cython安装ubuntu_ubuntu上的cython独立可执行文件
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
i want my cython program to be standalone executable on linux, not to be imported. after
cython --embed
i got a c file,now how can i make it executable?
ag凯发k8国际的解决方案
i guess you have to compile the .c file you have obtained.
assuming you are using python 3.5 and don't have to link to other libraries than python you can do this with a simple gcc command like :
gcc -i /usr/include/python3.5m -o your_program your_file.c -lpython3.5m
(you might need to remove the m following the version number)
as you expect it will use the if __name__ == "__main__": statement as entry-point of the program.
总结
以上是ag凯发k8国际为你收集整理的cython安装ubuntu_ubuntu上的cython独立可执行文件的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇:
- 下一篇: