.py to .exe with pyinstaller that can run on any PC - python

Well, I created a .py file which is a very simple login file. I converted it to exe and works fine on my computer. But when I send it to my friend, he cannot run the exe file because he doesn't have python installed in his pc and bin added to his computer's PATH.
So is there any way to create an exe file that can work on any other computer. Or we should install all the python and its used libraries.
By the way, I am using Python3.7, PyQt5 and pyinstaller for this application

Related

How to create exe of project who has .cxx .py file and many dlls

I have a code who is depended on Qt, PyQt, VTK, ITK, libs.
using CMAKE to build
Environment : Windows
I want to distribute EXE who has cxx, py files and related dlls
I have tried to compile and got executable but my python files are remaining necked.
I don't want to share python files as a script.
how we can make those python files as a dlls
python is often a hard language to turn to exe but the best way to do so is using the pyinstaller package. Installed by pip install pyinstaller and can turn a .py file to a .exe by pyinstaller --onefile FILENAME.py in CMD. After that your exe file should be stored in a folder called disk. The other files can just be included in the same file as the exe.
docs: https://pyinstaller.org/en/stable/

How to turn my python program into a software to install and how to prepare an installation file

I create a python application with pyqt5 and I use mysql for database. I want my program to be a software to install before using it in any PC like visual studio or mysql. I used cx_freeze before to create my exe file and it works fine but I have two problems with this solution:
-First: The application works without installation on the computer so that you can run it directly by opening the .exe file and there is no installation file.
-Second: I can't run the .exe file without installing mysql but I want to get the result that the software works after I installed the installation file without having to install mysql or anything else.

Pyinstaller app created on mac and cant share with Windows Users

Hello I have currently make a .app that runs perfectly I have shared it with my friends that use mac and it runs perfectly It is a PyQt5 app that I created with pyinstaller the commands I used to make it is:
pyinstaller --icon=(.....).icns --onefile --noconsole -n(.....) (the .py script) It compiles perfectly and creates the app with the icon image and opens up and all that I am able to compress it into a zip file and email it to my mac users which also runs for them without them having to install anything
But I have some window user friends that I want to share with and the .app obviously wont work (I tried to change the file name and replaces the .app with .exe) and tried to send that which doesn't work they try and run it and it says
"this app can't run on your pc To Find a version for your pc check with the software publisher"
and so I tried to compile a new app but with -F in the pyinstaller thing added to the ling of code I use in the terminal then a bunch of stuff runs in the terminal that says .exe and all that and when I drag it onto my desktop it is a .app and so I change it to a .exe again and try and share it with my window user friends and I get the same error
"this app can't run on your pc To Find a version for your pc check with the software publisher"
Can anyone help me out im really trying to get a way on how to make it run on windows computer please!
To create a Windows app the script need to be compiled in a PC with Windows. The same for Mac and Linux. This is in the manual:
PyInstaller is tested against Windows, Mac OS X, and Linux. However, it is not a cross-compiler: to make a Windows app you run PyInstaller in Windows; to make a Linux app you run it in Linux, etc. PyInstaller has been used successfully with AIX, Solaris, and FreeBSD, but is not tested against them.

How to run python converted .exe file in other system

In my system Python 3.6 is installed and I have converted my .py file to .exe in my system and the .exe is working fine. But the same .exe file is not working in other systems where Python is not installed.
Please let me know the procedure to run the .exe file without installing Python.
Thanks.

How do I make an exe file from a python code under Ubuntu?

I'm using Ubuntu 16 64-bit and python 3.5
I made a program on python and I want to distribute it as an EXE for Windows users.
The program I made depends on pandas and matplotlib
I downloaded PyInstaller.tar.gz and extracted it, but I can't find any clear info on how to make make an EXE.
I tried
python ../PyInstaller/pyinstaller.py --onefile ../Project/program.py
But it creates a sub folder with a lot of files and none of them are exe

Categories