I created a small program in python using a few imports:
splinter, Tkinter, webbrwoser, urllib, and re
The program has a GUI (through tkinter), and everything works fine when I run it through the command line.
However, when I try to create an executable file using these instructions, everything seems to work but then when I actually run the .exe file, I get the following error:
C:\Python27\dist>pypy.exe
Traceback (most recent call last):
File "pypy.py", line 1, in <module>
ImportError: No module named splinter
This is the code I used to get the .exe file:
from distutils.core import setup
import py2exe
setup(console=['pypy.py'])
So I'm guessing (after doing some reading in this SO post) the problem has something to do with missing files from my dist folder, but for the life of me I'm not sure where to go from here.
Please help me make my GUI python program work.
Thanks in advance,
Jona
ok! after quite a bit of digging (here, here, and here) I got it all to work!
Steps:
Python27\Lib\site-packages
before running the setup.pyC:\Python27\Lib\site-packages\selenium\webdriver\firefox
to dist\selenium\webdriver\firefox
after the setup (once the dist folder is created)windows
instead of console
in setup(console=['pypy.py'])
And that's it! Now the program runs and works with the GUI and splinter libraries sans hitch!