I tried to add the module idnadata to cx_Freeze; idnadata exists in idna folder:
C:\Users\seyed_vahid\AppData\Local\Programs\Python\Python36\Lib\site-packages\idna
I used the code below in setup.py:
from cx_Freeze import setup, Executable
packages = ['idnadata']
include_files = ['C:\\Users\\seyed_vahid\\AppData\\Local\\Programs\\Python\\Python36\\Lib\\site-packages\\idna']
setup(name = "instagram",
version = "1.0",
description = "test",
options = {'build_exe': {'packages':packages,
'include_files':include_files}},
executables = [Executable("instagram.py")],
)
I ran setup.py by :
python setup.py build
But I get the error below :
ImportError: No module named 'idnadata'
How do I resolve it?
I have resolved the problem thanks to
from cx_Freeze import setup, Executable
import sys
#main
exe = Executable(script="test.py", base="Win32GUI")
buildOptions = dict(excludes = ["tkinter"], includes =["idna.idnadata"], optimize=1)
setup(name = "instagram",version = "1.0", description = "test", executables = [exe], options = dict(build_exe = buildOptions))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With