-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cant find libsodium.dll on windows #59
Comments
i think it would be worthwhile to find out why this dll is not found on your system, even as you say you put it into various places. as far as i understand loadlibrary should load the libraries from where your system normally stores them. if loadlibrary cannot find the library then it's probably in the wrong place. i have little experience with windows, but i seem to remember your libraries need to be on the path, have you tried putting the lib in system32 i think that should be by default on the path. otherwise i read by googling that setx path also alters the path system-wise. but i'm really guessing here i have no idea about windows. |
i'm not sure sys.path is the right path to check, sys.path is for python modules, libsodium is not a python module. is it possible that it would be enough to pass 'libsodium-64' to ctypes.util.find_library? and have the library in any of the directories where windows is looking for dlls normally? |
If windows does have something similar to $LD_LIBRARY_PATH it might make sense to set that instead correctly. |
Would it be possible to parameterize the import so that the user of the library could specify the path to where the DLL is? I'm not immediately sure how to do that given that python lacks parametrized imports and pysodium imports the lib automatically without requiring something like an init() call. |
Could you modify this package so that it includes libsodium? https://github.com/pyca/pynacl/ works out of the box on any platform but they lack many of the functions (as does this one, although different ones, go figure - but at least this one is being developed while pynacl hasn't released since May 2020). Certainly you can take from their Github whatever is needed to make it work without installing DLLs by hand? |
sorry i have no access to windows hosts. |
Hi I was having some trouble using your wrapper on windows. I installed the sodium dll in multiple places but ctypes.cdll.LoadLibrary would always return None. I saw a couple of other people having this problem on windows as well. I added the following few lines to the top of your file to search the system path. Thanks
The text was updated successfully, but these errors were encountered: