欢迎访问 生活随笔!

凯发k8官方网

当前位置: 凯发k8官方网 > 运维知识 > ubuntu >内容正文

ubuntu

cython安装ubuntu-凯发k8官方网

发布时间:2024/10/12 ubuntu 25 豆豆
凯发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?

凯发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.

总结

以上是凯发k8官方网为你收集整理的cython安装ubuntu_ubuntu上的cython独立可执行文件的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得凯发k8官方网网站内容还不错,欢迎将凯发k8官方网推荐给好友。

  • 上一篇:
  • 下一篇:
网站地图