I installed "py2exe" for "Python2.7", made the program "Hello World", used py2exe to build my exe, and it worked fine.
Now, when I tried to create an exe of my actual code, the folders are created and the exe is also created without any problems, but when I run exe, the console appears for less than a second and closes.
The only difference in this case and the test program is that in this case I have several code files, and in some of them I import several files / libraries The following are the import commands for different files:
from bs4 import BeautifulSoup
import time
import requests
from RdWrtCls import *
import os
import openpyxl
Originally my source code:
from distutils.core import setup
import py2exe
from glob import glob
setup (console =['Crawler.py'])
, , dll, :
from distutils.core import setup
import py2exe
from glob import glob
data_files = [("Microsoft.VC100.CRT", glob(r'C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\redist\\x86\\Microsoft.VC100.CRT\\*.*'))]
setup(data_files =data_files,console =['Crawler.py'])
, .
:
:
Windows 7,
Python 2.7-32
:
, EXE.
Import error : No module named bs4