简体   繁体   English

Python cx_Freeze错误“没有名为'cx_Freeze.util'的模块

[英]Python cx_Freeze error “No module named 'cx_Freeze.util'

I am running a very simple code to test cx_Freeze module but when running appears the error above. 我正在运行一个非常简单的代码来测试cx_Freeze模块,但是运行时出现上面的错误。 I am using Python 3.5 and the new version (5.0) of cx_Freeze. 我正在使用Python 3.5和cx_Freeze的新版本(5.0)。

CODE: Calling cx_Freeze: from cx_Freeze import setup Executable setup( name = "Prueba", version = "0.1", description = "My application!" executables = [Executable("pruebas.py")]) 代码:调用cx_Freeze:从cx_Freeze导入安装程序可执行安装程序(名称=“ Prueba”,版本=“ 0.1”,描述=“我的应用程序!”可执行文件= [Executable(“ pruebas.py”)]))

pruebas.py: text='Hello' print(text) pruebas.py:text ='Hello'print(text)

Thanks. 谢谢。

there is 2 type cx_freeze installation package: amd64 or win32 Make sure that what you have is the good version. 有2种类型的cx_freeze安装包:amd64或win32确保所拥有的是正确的版本。 I firstly installed the version amd64,but apperently my python version is 32bits. 我首先安装了amd64版本,但是我的python版本显然是32位。 So i met the same pb as yours. 所以我遇到了和你相同的铅。 Try another one, maybe you can success. 再尝试一个,也许您可​​以成功。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM