简体   繁体   English

Python cx_Freeze 错误“没有名为‘cx_Freeze.util’的模块”

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

When I run setup.py build , I get the error mentioned in the title above.当我运行setup.py build ,我收到上面标题中提到的错误。

Here is my code:这是我的代码:

from cx_Freeze import setup, Executable

setup(
    name="testing",
    version="3.1",
    description="test",
    executables = [Executable("client.py",base="Win32GUI")])

I am running Python 3.4.我正在运行 Python 3.4。

I am using python v3.6.我正在使用 python v3.6。 I have solved the problem by installing upgrade for cx_freez issue following command to python我已经通过以下命令为 cx_freez 问题安装升级到 python 解决了这个问题

    python -m pip install cx_Freeze --upgrade

Double check to make sure you have a version of cx_Freeze installed that works with Python 3.4, I have had that error once and this was the problem.仔细检查以确保您安装了一个适用于 Python 3.4 的 cx_Freeze 版本,我曾经遇到过该错误,这就是问题所在。

Have you tried using from cx_Freeze import *?您是否尝试过使用 from cx_Freeze import *?

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

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