1

Good morning ! I am using pynsist to create a windows installer for a script written in python. I have listed all the packages the script needs in the [Include] section. When I run the python -m nsist installer.cfg command to generate the installer, the error below occurs. ImportError: Cannot bundle namespace package 'mpl_toolkits' How to fix this error? Here is the contents of the configuration file:

[Application]
name = AQuiData
version = 0.1
publisher =  Wahabo OUEDRAOGO
script  = AquiData.py
icon = Donnees/Logo_logiciel.ico
console = true

[Python]
version = 3.9.7

[Include]
packages = numpy  
    pandas 
    matplotlib 
    PyQt5
    scipy 
    pyqtgraph
    sympy 
    pyvisa
    ctypes 
    visa 
    openpyxl 
    pyvisa_py 
    keysight 
    xlsxwriter 
    serial 
    pytz
    dateutil
    six
    mpmath
    sklearn
    usb
    et_xmlfile
    PIL
    pyparsing
    pylab
    cycler
    kiwisolverenter code here
    mpl_toolkits
    picosdk
    AQ

[Build]
installer_name = AQuiData.exe
Thomas K
  • 39,200
  • 7
  • 84
  • 86
Abdoul
  • 11
  • 1
  • `mpl_toolkits` is a 'namespace package', which means it's not really one thing, but a collection of things, which could be imported from different places. Pynsist doesn't know how to copy this from your installed packages. A better option is probably to list the relevant installable packages on PyPI under the `pypi_wheels` option ([docs](https://pynsist.readthedocs.io/en/latest/cfgfile.html#include-section)). – Thomas K Dec 04 '21 at 15:52

0 Answers0