amsehili / auditok

An audio/acoustic activity detection and audio segmentation tool
MIT License
732 stars 94 forks source link

Making standalone executable for win32 #18

Open toatyy opened 5 years ago

toatyy commented 5 years ago

Hi. After I successfully installed auditok, I have this this two files in the Script directory:

I tested the executable, and it perfectly worked. But for now, I want to be able to run this on the other machine without python installed. In other words, I need win32 standalone console executable of auditok.

I tried to use pyinstaller:

pip install pyinstaller
pyinstaller auditok-script.py

After that I have "dist" directory with "auditok-script" dir and bunch of files in it. I run auditok-script.exe in the dir, and it gave me the error:

...\python\Scripts\dist\auditok-script>auditok-script.exe
Traceback (most recent call last):
  File "auditok-script.py", line 11, in <module>
  File "site-packages\pkg_resources\__init__.py", line 480, in load_entry_point
  File "site-packages\pkg_resources\__init__.py", line 472, in get_distribution
  File "site-packages\pkg_resources\__init__.py", line 344, in get_provider
  File "site-packages\pkg_resources\__init__.py", line 892, in require
  File "site-packages\pkg_resources\__init__.py", line 778, in resolve
pkg_resources.DistributionNotFound: The 'auditok==0.1.8' distribution was not found and is required by the application
[21452] Failed to execute script auditok-script

...\python\Scripts\dist\auditok-script>

I'm not very familiar with python, so maybe there another way to build standalone binaries? Or how can I fix this error?

Thanks.