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.
Related
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/
I want to convert a ".py" file to ".exe" file and I have converted that using "auto-py-to-exe"
But the file is not working on the other PC, it shows the error like this
ModuleNotFoundError: No module named 'pygame'.
I used 'pygame' in the .py project and the other PC doesn't have 'pygame' installed.
I'd like to convert ".py" file to ".exe" file and I'd like to run on any PC independent of whether it has Python or the respective libraries installed or not. Is there any way to do that?
Thank You #Starbuck5
As #Starbuck5 mentioned in the comment.
These sorts of problems happen when people mix up python installations on their own computer. What’s happened is that the python installation with pygame is not the same installation as the one with PyInstaller. So when PyInstaller runs, it can’t find a pygame to package. –
Starbuck5
I have created a new virtual environment and installed libraries needed for my project and auto-py-to-exe in that virtual env. Then by using auto-py-to-exe, I converted my python file to .exe file and now it's working properly.
You can use any of these methods "auto-py-to-exe", "py2exe" or "pyinstaller", or any other method possible.
Just the libraries should be accessible by pyinstaller or another method you use.
The best way is to do this in a virtual environment.
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.
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
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