简体   繁体   中英

Making a Python executable for a specific task

I'm a neuroscientist and thus not very Python skilled, but i have managed to come up with a code which uses API access to download certain neurons from a specific website (neuromorpho.org). I want this to be publicly available so that other people which are not that familiar with Python can easily get what they need (planing on posting it to GitHub and making other similar stuff like this).

So i wanted to basically create an executable file in which people can select what they want and get a.csv file with neurons at the end. This perfectly works from inside the JupyterNotebook. However, when i use Auto Py to EXE to create and executable it doesn't work. It works for a long time, creates thousands of files (more than 1GB of data) and when you launch the executable nothing happens.

I presume it has something to do with the ipywidget that i have used to create selections for the initial query.

Here is the link to the.ipynb file: https://www.file.io/download/nKD91O5Ge7rV and the.py file: https://file.io/nUqQ4fnGpCSh

I know that this might be confusing to somebody not familiar to this, but i have placed some markdowns inside the notebook to explain in detail what is the problem.

I recommend to take a look on the PyInstaller and Nuitka . They can produce the standalone executables.
Example with nuitka :

(linux) python -m nuitka --onefile --output-dir=./nuitka --standalone --follow-imports --plugin-enable=qt-plugins ./../updater.py
(windows) python -m nuitka --onefile --windows-uac-admin --windows-disable-console --windows-icon-from-ico=.\updater\resources\ico\au.ico --output-dir=.\nuitka --standalone --follow-imports --plugin-enable=qt-plugins --windows-company-name=Name --windows-product-name=Name --windows-product-version=1.0.0 --windows-file-description=Name .\..\updater.py

Example with pyinstaller :

pyinstaller --onefile --windowed --icon=./updater/resources/ico/au.ico updater.py

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM