pynsist | Build Windows installers for Python applications | DevOps library
kandi X-RAY | pynsist Summary
kandi X-RAY | pynsist Summary
Build Windows installers for Python applications
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Add paths to the system path
- Setup the UI
- Translate the UI
- Remove from system path
- Expand sz value
- Run the installer
- Copy extra files to the installer
- Download an embeddable build
- Copy the license file
- Returns the arguments for the installer builder builder
- Read shortcuts section
- Read the commands from the config file
- Read extra files
- Read and validate a config file
- Check for invalid keys
- Check that all mandatory fields are present
- Checks the configuration of the given section
- Return a set of files to ignore
- Broadcasts the environment settings change
- Read a single frame
- Convert array to QImage
pynsist Key Features
pynsist Examples and Code Snippets
Community Discussions
Trending Discussions on pynsist
QUESTION
I just added the ability of my python application to write a data set out to an excel file using openpyxl. Apparently openpyxl is dependent on the et-xmlfile. I create an install of my application by first running "setup.py sdist bdist_wheel" and then "pynsist installer.cfg". I added both openpyxl==3.0.7 and et-xmlfile=1.0.1 to the [Include] section of the installer.cfg file.
When running pynsist I get the following error.
File "c:\users\vh942e\appdata\local\python\lib\site-packages\nsist\wheels.py", line 150, in get_from_pypi raise NoWheelError('No compatible wheels found for {0.name} {0.version}'.format(self)) nsist.wheels.NoWheelError: No compatible wheels found for et-xmlfile 1.0.1
Are there any ideas about how to solve this no compatible wheels problem? All other included libraries work.
...ANSWER
Answered 2021-Mar-14 at 12:00et-xmlfile doesn't have wheels on PyPI and for now, Pynsist only consumes wheels someone else has buil. That may change one day, but it would be a significant extra bit of complexity.
It looks like it's a pure Python project, so it's easy to make a wheel of it yourself:
QUESTION
If i have built an application using Pynsist package and then after the installation of that application, I will have a numpy package in the pkg folder of the application path just like what i mentioned in the installer.cfg
.
But there wont be any numpy in the site-packages of Python 2.7 (installed because of the python installer downloaded by NSIS built application.
So how would the python know if there is a numpy in the computer or not? In other words, how would the numpy package in the application folder will link itself to Python lib/site-package folder? Do we need to copy that folder into the site-package location or am I missing something?
Below is the installer.cfg code
...ANSWER
Answered 2019-Nov-24 at 03:45Here, to let the application know that numpy has also to be imported, we add a dependency in installer.cfg file. The dependency is: anaconda-project. Now the numpy can be imported properly.
QUESTION
I've got ready, already compiled python application for windows but there is a problem with making an installer, which creates desktop icon for it when you check a corresponding mark.
I made an installer using clean NSIS
script, fbs
and pynsist
. Actually, there is no problem to create an installer which downloads your app to Program Files
but however I haven't found the way to create an icon which will be shown on desktop.
Any help is appreciated.
...ANSWER
Answered 2019-Sep-26 at 20:16Pynsist does not seem to have a way to inject extra code for some reason but you can override the entire install script.
Make a copy of your pyapp.nsi file (or grab it from Github).
There are two places in the file where it does CreateShortCut "$SMPROGRAMS\....
.
Add another line under it with:
QUESTION
I would like to build my program that uses matplotlib
, which requires tkinter
.
The problem is that I can't include tkinter
, as it is not on pyPi (and it has now wheels).
I use Pynsist to build an NSIS installer. Here is the cfg:
...ANSWER
Answered 2019-Apr-14 at 12:09I found it in the documentation: Pynsist documentation
"Because Pynsist makes use of the “bundled” versions of Python the tkinter module isn’t included by default. If your application relies on tkinter for a GUI then you need to find the following assets..."
QUESTION
I am a new user of cx_Freeze and I wanted to package my python file with all needed dependencies.
I use Python3.
I work under a python virtualenv with dependencies such as tensorflow, sklearn, matplotlib, python-vlc...
Here are all files needed to reproduce the same error on Windows.
My requirements.txt to install
...ANSWER
Answered 2019-Feb-08 at 14:08I see the following potential problems in your setup script for cx_Freeze
5.1.1:
You are using
numpy
(andmatplotlib
which depends onnumpy
). In order thatcx_Freeze
correctly freezesnumpy
, it needs to be added to thepackages
list of thebuild_exe
options.For
cx_Freeze
version 5.1.1, the TCL/TK DLLs need to be included in alib
subdirectory of the build directory. You can do that by passing a tuple(source, destination)
to the corresponding entry of theinclude_files
list option. Furthermore, it would be safer to dynamically find out the location of the TCL/TK DLLs.
Altogether, try with the following modifications in your setup script:
QUESTION
I have built a GUI using PyQt5
and wanted to distribute it to other computers without Python
installed by packageing it with pynsist
. Unfortunately, when launching the shortcuts produced by the installer, the GUI does not open as expected and Python
keeps crashing (even if Python
is instlalled).
The console shows the following error upon crashing:
...ANSWER
Answered 2018-Mar-12 at 12:45When I first encountered this problem I simply added sip.pyd
to my project-folder. You can find it under:
QUESTION
Is there now an easy protocol to build a .exe from python 3.5+, using modules pyqtgraph, qt5, theano, pymc3, numpy, scipy, os and sys, and opening a simple GUI stored in a '.ui' file ? I lost hours and eventually failed to make one (for w7-64 bits). Help !
preliminary failure with py2exe: I first install py2exe for python 3 but it turns out this is not compatible with my python 3.6 yet, so I downgraded to python 3.5… to get a bunch of errors. Then I went to forums and tried the proposed cures but failed (I’m uneasy with windows), the alternative being to downgrade to python 3.4… So I downgraded to python 3.4 to get an error concerning a missing ‘msvcr100.dll’ that I tried to install following instructions on forums but by default I don’t have the permission to modify system directories… When I eventually had this permission it turns out the ‘regsvr32’ command fails (isn’t this for 32 bits ? but there is no ‘regsvr64’…). Following episodes are described below.
update august 23, 2017, 1pm:
I also tried pyinstaller as advised but it failed (see my related question build a .exe for Windows from a python 3 script importing theano with pyinstaller)
I also tried cx_freeze but it failed (see my related question build a .exe for Windows from a python 3 script)
I also tried pynsist but it fails (same link than above)
what's next ?
update september, 2, 2pm:
I eventually managed to build a .exe with pyinstaller after many episodes.
Unfortunately I failed to deal with the ‘theano’ module (that is required in my case by the ‘pymc3’ module) and I had to modify the .py files and give up part of the application. Could anyone help me building a .exe for windows 7+, with the ‘theano’ module ?
see build a .exe for Windows from a python 3 script importing theano with pyinstaller
...ANSWER
Answered 2017-Jun-16 at 08:19I would suggest pyinstaller see http://www.pyinstaller.org/
The pyinstaller already supports 3.5
The development version supports 3.6
QUESTION
I am packaging a Python 2.7 program with the lastest version of Pynsist.
I've created an installer.cfg file following this example.
But when I try to package my application running
ANSWER
Answered 2017-Sep-13 at 12:15Reposting as an answer, since it worked:
If you put pygame in packages=
, it tries to copy it from your computer. But on your computer that's pygame for Linux, which won't work on Windows. If you instead put pygame in the pypi_wheels=
bit of the config file, Pynsist will take care of downloading a Windows version for you.
Have a look at the pygame example in the Pynsist repository.
Most packages don't have this problem because they only contain Python code, which is the same files on all platforms. Pygame has compiled modules, which have to be compiled for the right platform.
QUESTION
I'm trying to replicate the following example: https://github.com/takluyver/pynsist/tree/master/examples/tkinter but it is not working. I have a python file and .cfg that are copy pasted from here, but when I run py -m nsist installer.cfg
on my command prompt, I get the following error:
ANSWER
Answered 2017-Mar-04 at 14:01The issue turned out to be that the config file was called installer.cfg.txt
, rather than installer.cfg
.
If you're having a similar issue, double check that the config file is in the right place and the name matches what you're typing at the command line. Remember that some programs (like Windows Explorer) might hide known extensions, so what you see might not be the real file name. Using a terminal or command prompt will usually show you the real name.
I'll make Pynsist give a clearer error when the config file isn't there.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install pynsist
You can use pynsist 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