Skip to content

Commit

Permalink
debug windows path
Browse files Browse the repository at this point in the history
  • Loading branch information
gesellkammer committed Nov 24, 2024
1 parent d76ba53 commit 529516f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ctcsound7/_dll.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import ctypes as ct
import ctypes.util
import sys
import os
from functools import cache
from .common import BUILDING_DOCS

Expand Down Expand Up @@ -44,6 +45,11 @@ def csoundDLL() -> tuple[ct.CDLL, str]:
libname = csoundLibraryName()
path = ctypes.util.find_library(libname)
if path is None:
if sys.platform.startswith('win'):
PATH = os.getenv('PATH')
raise ImportError(f"Csound library not found (searched for '{libname}'. "
f"Make sure that csound is installed and the directory containing "
f"csound64.dll is in the path. PATH='{PATH}'")
raise ImportError(f"Csound library not found (searched for '{libname}') - Make sure that csound is installed")
_libcsound = ct.CDLL(path)
_libcsoundpath = path
Expand Down

0 comments on commit 529516f

Please sign in to comment.