cx_freeze ImportError: No module named 'idna'

孤街醉人 提交于 2019-12-08 04:14:02

问题


I'm using python 3.6 Trying to make and exe from my .py file. but when I run python setup.py build it give me an error

raise ImportError("No module named %r" % name) ImportError: No module named 'idna'

My setup file is like this setup file


回答1:


Save:

# 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")])

as setup.py in the same directory of your Example.py (the .py you want to convert to .exe)

And then run >python setup.py build in that directory with command prompt.



来源:https://stackoverflow.com/questions/45881255/cx-freeze-importerror-no-module-named-idna

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!