简体   繁体   中英

Convertin .py files to .exe and run it in windows 10 without any installation

I have already converted my python script .py to .exe using pyinstaller. When I try to run this exe in Windows 10. It states this app can not be run on your PC.

As far as I see, I need to install Python in Windows as well, but in my situation this is not an option. In my company, every computer uses Windows 10 and there is no way for me to install Python all of them.

What I wonder is that whether there is any way to run my .py script in Windows 10 without installing anything into Windows 10. I should give a working directory to people in my company and they should run my script with just one click.

EDIT: With the help of @Amey and @L00n3y, I managed to solve my problem. In case anyone has same problem, I explained the procedure clearly, in this link .

With the help of @Amey and @L00n3y, I managed to solve my problem. In case anyone has same problem, I explained the procedure clearly, in this link .

have you tried py2exe?

py2exe is a distutils extension which allows to build standalone Windows executable programs from Python scripts.

You can download it here:

https://pypi.org/project/py2exe/

You can also use 'Pyinstaller' which is widely used.

Install it using,

pip install pyinstaller

And create an executable using the following command,

Python pyinstaller.py --onefile pythonfile.py

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM