pyexe | single Windows executable for python | DevOps library
kandi X-RAY | pyexe Summary
kandi X-RAY | pyexe Summary
Here is a stand-alone version of python that is a single Windows executable. It consists of the most recent versions of Python (with builds for 2.7, 3.5, and 3.6 each in 32-bit and 64-bit versions), pywin32, psutil, six, pip, setuptools, and includes all packages that can be included without additional dlls, excepting tkinter. See the appveyor script for build instructions.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Main function .
- Lists installed modules .
- Prepare the environment .
- Override _MEIPASS2 .
pyexe Key Features
pyexe Examples and Code Snippets
py36-64.exe -m pip install --no-cache-dir --target . --upgrade sympy
Community Discussions
Trending Discussions on pyexe
QUESTION
I have been trying to use PyInstaller to distribute my program as a bundled .exe file to my colleagues. The program, which analyses text data, runs perfectly from my CMD. I am using PyInstaller 3.6, Python 3.7, Windows 10, and Anaconda3 as my python environment. The program has quite a few dependencies including nltk, gensim, wordcloud, sklearn, matplotlib, mpld3, seaborn, pandas, numpy, xlsxwriter and a few standard libraries. It is also quite a long program, ~2000 lines.
The Problem: So far, I've successfully built the .exe file (as a one-folder and one-file bundle). To test whether the .exe file works, I run it from my CMD. All is going well (my imports and functions run OK, I am prompted to enter the name of the Excel file containing text data, the text is cleaned etc) but it abruptly terminates, without any warning or error message, on a line that uses Gensim's SparseTermSimilarityMatrix function. I experimented by commenting out this line and it terminates on the very next line, again without any message.
I am building the .exe file using a .spec file (so that I can add data files to my bundle and several hidden imports to overcome Module Not Found Errors). The only indication I have as to what is causing this problem are warnings about missing DLLs during build-time:
...ANSWER
Answered 2020-Jun-30 at 21:17After realising the .exe file successfully runs from my CMD if I first activate my anaconda environment, here was my original solution, which was only suitable for a one-folder bundle:
From the root directory of my anaconda environment, I searched for all "dll" files (which returns a lot). I copied all DLL files returned by the search to the "dist" folder of my bundle, skipping duplicates.
The .exe file no longer terminated early and worked perfectly!
It seems that the warnings I received about missing DLLs during build-time were misleading - the DLL files quoted are still not on my computer.
SOLUTION UPDATE: After manually copying all DLL files from my anaconda environment to the dist folder of my bundle, I experimented by removing each DLL file I manually added one by one and testing whether the .exe file still worked or terminated early as before. It came down to just one DLL file: libiomp5md.dll - this was, quite literally, the missing link! Therefore, my recommendation:
- search for "libiomp5md.dll" within your anaconda environment and copy it to the directory containing your .spec file
- add it as a data file in your .spec file and specify that it should be stored in root directory of your bundle:
datas=[('libiomp5md.dll', '.')]
- Build your executable using the .spec file (either as one-folder or one-file bundle)!
I hope this helps anyone facing similar DLL-related issues.
QUESTION
I need to send my program to someone who will compile it using a makefile, and without pyinstaller or installing anything with pip3.
It needs to work on linux.
Is it possible ? (I can only find answers about pyinstaller and pyexe).
...ANSWER
Answered 2019-Sep-03 at 15:20If you want to make a file.py
executable using ./file.py
command, you first have to add the shebang as first line in the file:
#!/usr/bin/env python3
for python 3.x or #!/usr/bin/env python2
if you are still using python 2.7
Next step is to change permissions of the file to make it executable.
You can do that by typing chmod 744 file.py
in prompt
QUESTION
I have made a simple script to say text, below:
...ANSWER
Answered 2017-Dec-22 at 16:20Update: I have found that manually copying the dependencies into the lib folder of the build fixed the problem as it was only copying half of the idna module.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install pyexe
You can use pyexe like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page