I am trying to convert a python scripts as an executable file for Linux.

我试图将python脚本转换为Linux的可执行文件。

I use freeze.py script to convert a python script into an executable file.

我使用freeze.py脚本将python脚本转换为可执行文件。

I get this output:

我得到这个输出:

~$ python freeze.py carbuddy.py
Traceback (most recent call last):
File "freeze.py", line 100, in <module>
import checkextensions
File "/home/darknight/checkextensions.py", line 6, in <module>
import parsesetup
ImportError: No module named parsesetup  

(Where carbuddy.py is the scripts which I would like to convert into an executable)

(其中carbuddy.py是我想要转换为可执行文件的脚本)

2 个解决方案

#1


1

I'm aware of freeze.py but I haven't worked with it that much. I've been trying to use it in my system (Ubuntu 12.04 LTS) but I'm getting the same error as you. So, unfortunately, I can't help that much if you really want to use freeze.py.

我知道freeze.py,但我没有那么多。我一直在尝试在我的系统中使用它(Ubuntu 12.04 LTS),但我得到了和你一样的错误。所以,不幸的是,如果你真的想使用freeze.py,我帮不了那么多。

But if you are trying to make executables, why don't you look at Cython? It is not exactly meant for making binary executables out of Python but it is possible. You'd have to invoke GCC (which is longer to type than good ol' freeze) but that's the only downside as far as I can tell. See this SO answer for more details.

但是如果你想制作可执行文件,为什么不看看Cython?它并不完全是用Python制作二进制可执行文件,但它是可能的。你必须调用GCC(它的输入时间比冷冻更好),但就我所知,这是唯一的缺点。有关详细信息,请参阅此SO答案。

更多相关文章

  1. linux shell脚本指令
  2. Shell脚本编写简明教程
  3. LINUX下用SHELL脚本执行带输入输出参数的ORACLE存储过程并得到结
  4. 存储过程放在sql脚本里,命令行导入总是提示错误
  5. java之生成可重复执行的sql脚本
  6. 50分求关于执行SQL脚本文件的问题,在线等 解决了马上结贴。
  7. identity_insert和表初始化脚本
  8. 脚本与SQL Server中的表并发运行
  9. 个人网站对xss跨站脚本攻击(重点是富文本编辑器情况)和sql注入攻击

随机推荐

  1. Android TimePicker
  2. 由浅入深研究Android(3)--浅谈线程的一些东
  3. Android控件之CheckBox(复选框控件)
  4. Android中按钮点击效果显示
  5. android Content provider 组件
  6. Activity的启动模式
  7. 第一行代码读书笔记 Kotlin Android
  8. Android去掉顶部的阴影
  9. Android基础系列-----------Android进程/
  10. Android 5.0有哪些变化