Python , exe file generated by PyInstaller not running on another pc with the same windows version

When i convert my python script to exe on windows platform by pyinstaller i get the output file ran successfully in the same pc ,
but it doesn't run in another pc and i got this error ..
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "c:\users\Rayan\appdata\local\temp\pip-build-25jk7z\pyinstaller\PyInstaller\loader\pyi_importers.py", line 409, in load_module
ImportError: DLL load failed: The specified module could not be found.

Open in new window


python 2.7.10
pyinstaller 2.1

how can i fix it .. ?!
RayanCoheenAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gerwin Jansen, EE MVETopic Advisor Commented:
The directory where you build the .exe will have some libraries (dll's) that are needed by the .exe afaik. It's just a few, try copying them to the other PC to the same folder where you copied the .exe
0
RayanCoheenAuthor Commented:
That's right i tried to put them side by side with my exe file and i noticed that PyInstaller puts them there , but i have the problem too .. !!
0
Gerwin Jansen, EE MVETopic Advisor Commented:
I remember using py2exe for building executables from python, you could give that a try:

http://sourceforge.net/projects/py2exe/
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

gelonidaCommented:
I think py2exe creates backwards compatible executables, but in some cases not forward compatible ones.
So  if you want for example that your executable runs on windows XP, you should be able to build on XP and it should run on XP, Win7, Win8, however if you build on Windows 8 your executable might not run on Win7 / WInXP

Could this be the problem?
E.g. build on windows 8 and attempt to deploy on windows 7?
0
gelonidaCommented:
by the way:

Your pyinstaller version is rather old.
3.0 is the current version if you install with pip install.

Just type
pip intall -U pyinstaller

Open in new window

1
Gerwin Jansen, EE MVETopic Advisor Commented:
Why the C-grade?
0
gelonidaCommented:
did you try to upgrade pyinstaller?

If yes why did you never give feedback?

If no, were my suggestions not clear?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Python

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.