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?

解决方案

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.

cython安装ubuntu_ubuntu上的Cython独立可执行文件相关推荐

  1. cython(cython安装)

    python怎么使用cython 1. Cython是什么? 它是一个用来快速生成Python扩展模块(extention module)的工具 语法是Python和c的混血 Cython作为一个Py ...

  2. python导入pyx文件_使用cython从多个pyx文件制作可执行文件

    我想从我的python源文件中创建一个unix可执行文件. 我有两个文件,p1.py和p2.py p1.py: – from p2 import test_func print (test_func( ...

  3. cython安装、使用

    cython安装.使用 原创 2012年09月27日 17:25:11 8436 0 0 一.cython 在linux(ubuntu)下安装 sudo apt-get install cython ...

  4. Py之cython:python库之cython的简介、安装、使用方法之详细攻略

    Py之cython:python库之cython的简介.安装.使用方法之详细攻略 目录 cython的简介 cython的安装 cython的使用方法 cython的简介 Cython语言使得Pyth ...

  5. 【cython安装教程】

    cython安装 1.阿里源快速安装 pip install cython -i https://mirrors.aliyun.com/pypi/simple/ 安装完成后,cmd pip list查 ...

  6. cython python3_30倍!使用Cython加速Python代码

    原标题:30倍!使用Cython加速Python代码 作者:George Seif.Thomas Wolf.Lukas Frei 编译:1+1=6 | 公众号海外部 前言 你可能经常会一次又一次地听到 ...

  7. sw安装未成功_Solidworks安装错误问题(四)可执行文件vc_redist未成功安装

    可执行文件vc_redist未成功安装 造成问题的原因: 出现这个问题大多原因都是因为你更新了漏洞文件,可能大家电脑都会装360安全卫士,或者是腾讯管家等.这些安全软件都会提示你去更新漏洞文件.而So ...

  8. 独立显卡linux安装教程,linux 安装meshlab并且指定使用独立显卡

    linux 安装meshlab并且指定使用独立显卡 linux 安装meshlab并且指定使用独立显卡 1.0 目录组织 [nash5 meshLab]# tree $(pwd) /home/ld/S ...

  9. Matlab 如何发布独立可执行文件

    问题背景:需要发布独立可执行文件主要有以下几种原因,(1) Matlab本身安装文件比较大,且安装盗版软件有可能涉及侵权:(2) 自己编写的源代码不想公开,但又要提供给其他人使用.(3) 想要跨平台/ ...

最新文章

  1. jQuery-Ajax
  2. H3C   ISIS与BGP 路由配置
  3. 报告显示:2018年北京人工智能相关产业达1500亿元
  4. python取的键不存在_Python3基础 dict get 在查询不存在的键时,返回指定的内容
  5. 关于ORM和存储过程的一些看法
  6. sql 相加_Java整数相加溢出怎么办?Java 8 还是厉害!
  7. Node-Promise
  8. word文字校对工具_如何在Word中使用校对面板
  9. 三到五年Java简历模板
  10. 大物实验报告-转动惯量的测定金属杨氏模量的测定
  11. 关于ramp texture的使用
  12. 阿里云短信服务接口触发天级流控Permits:10
  13. 关于PHP中如何跟踪报错的手段
  14. C语言学习(七)之数组
  15. 如何靠区块链赚钱?区块链到底是不是骗局?
  16. PHP:执行 PHP 文件
  17. ArcGis制作三维地形图教程
  18. 华为天才少年谢凌曦:关于视觉识别领域发展的个人观点
  19. 条码查询接口,商品条码和药品条码查询
  20. Kids Photography: Newborns 儿童摄影教程:新生儿 Lynda课程中文字幕

热门文章

  1. Python virtualenv激活与退出虚拟环境
  2. CDH6.3.2 HUE集成HBase
  3. 【收藏】如何避免everything每次都重建索引
  4. hbase集群重启后异常删除zookeeper中的元数据
  5. scala入门示例helloworld及idea中集成Scala库
  6. loadrunner脚本设计:参数化
  7. Spring4 MVC表单验证代码示例
  8. Java中外部类访问内部类的方法
  9. Windows 下 Anaconda3 的安装配置
  10. 如何优雅而又不失内涵的在centos7下安装tree命令