【问题标题】:cx_freeze ImportError: No module named 'idna'cx_freeze ImportError:没有名为“idna”的模块
【发布时间】:2017-08-25 12:17:35
【问题描述】:

我正在使用 python 3.6 试图从我的 .py 文件中制作和执行。但是当我运行 python setup.py build 它给了我一个错误

raise ImportError("No module named %r" % name) ImportError: 没有名为“idna”的模块

我的安装文件是这样的 setup file

【问题讨论】:

    标签: cx-freeze python-3.6


    【解决方案1】:

    保存:

    # thanks to https://www.youtube.com/watch?v=GSoOwSqTSrs
    from cx_Freeze import setup, Executable
    
    setup(
        name='KutsalAklinNerde?',
        version='0.1',              #Further information about its version
        description='Parse stuff',  #It's description
        executables= [Executable("Example.py")])
    

    作为 setup.py 在您的 Example.py 的同一目录中(您想要的 .py转换为 .exe)

    然后使用命令提示符在该目录中运行 >python setup.py build

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-08-15
      • 1970-01-01
      • 2013-03-11
      • 2012-12-07
      • 2012-05-23
      • 2019-07-29
      相关资源
      最近更新 更多