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\", 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 .. ?!
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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
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 .. !!
Gerwin Jansen, EE MVETopic Advisor Commented:
I remember using py2exe for building executables from python, you could give that a try:

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
Learn Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

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?
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

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

If yes why did you never give feedback?

If no, were my suggestions not clear?
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

From novice to tech pro — start learning today.