question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

libsndfile32bit.dll path

See original GitHub issue

Hi, I was building a package with PyInstaller for a python script that calls PySoundFile functions. The DLLs are bundled into a ‘dist’ folder together with a Windows EXE of the program. However, when I ran the EXE, an error occurred in soundfile.py as it was looking for libsndfile32bit.dll in …_soundfile_data folder though the DLL is already bundled into the same directory as the EXE.

When I looked into soundfile.py, the following section looks like the part that searches the DLL:

try: _snd = _ffi.dlopen('sndfile') except OSError as err: if _sys.platform == 'darwin': _libname = 'libsndfile.dylib' elif _sys.platform == 'win32': from platform import architecture as _architecture _libname = 'libsndfile' + _architecture()[0] + '.dll' else: raise _snd = _ffi.dlopen(_os.path.join( _os.path.dirname(_os.path.abspath(__file__)), '_soundfile_data', _libname))

Is there a better way to go about doing this as I would have to manually create “_soundfile_data” in the dist folder in order for the program to run correctly.

Thanks.

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
pihuyadavcommented, Nov 28, 2019

do pip install pysoundfile

0reactions
mgeiercommented, Nov 13, 2018

@tritipsteak IIRC, sndfile.dll is only found by ctypes/CFFI if you put it somewhere in the Windows PATH.

Did you try putting it in _soundfile_data\libsndfile32bit.dll (relative to the dist folder)?

There is this hack (see #192) which might work for this:

https://github.com/bastibe/SoundFile/blob/43c457e73984f15ca5c5ad47390dcc8e913da3c1/soundfile.py#L153-L163

Read more comments on GitHub >

github_iconTop Results From Across the Web

libsndfile32bit.dll path #163 - bastibe/python-soundfile - GitHub
Hi, I was building a package with PyInstaller for a python script that calls PySoundFile functions. The DLLs are bundled into a 'dist'...
Read more >
Pyinstaller does not include libsndfile - Stack Overflow
--add-binary /path/to/_soundfile_data/libsndfile.dylib:_soundfile_data. In my case I find the (active) conda environment pysndfile is ...
Read more >
Download Libsndfile.dll for Windows 10, 8.1, 8, 7, Vista and XP
The Libsndfile.dll file is a dynamic link library for Windows 10, 8.1, 8, 7, ... Method 1: Installing the Libsndfile.dll File to the...
Read more >
libsndfile.dll free download - DLL‑files.com
Download libsndfile.dll below to solve your dll problem. We currently have 1 version available for this file. If you have other versions of...
Read more >
Compile ZDoom on Windows
libsndfile 32-bit or 64-bit; libmpg123 32-bit or 64-bit ... copy the 'fmodex.dll' or 'fmodex64.dll' to the zdoom/Debug folder (e.g. cp C:\Program Files ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found