-
Notifications
You must be signed in to change notification settings - Fork 16
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
Cannor load DLL on WIndows #124
Comments
I had another report of this which was eventually resolved… Do you happen to be running a 32-bit version of Python or otherwise in a 32-bit environment? The library is currently only built for 64-bit architectures, so I suspect this might be the issue. |
@ideoforms I'm on a 64 bit machine with Python 64 bit. I also hoped that was the reason, but no. |
This issue came back for me in a new venv. Looking at signalflow.pyd in Dependencies, signalflow's init.py is failing because the paths to the the .dlls don't seem to have resolved perhaps? I would have thought the .pyd should be resolving the paths to: \Lib\site-packages\signalflow.libs\name.dll One quick resolution is simply copy the .dll's from signalflow.libs and place them in the \Lib\site-packages\signalflow directory, then: from signalflow import * should work. Here you can see the three files in signalflow.pyd haven't been found, which is correct, they don't exist in the same directory as signalflow.pyd. This is the error i get:
Another way that should work is do this where you're importing signalflow:
|
Actually, it makes no difference copying then to signalflow dir, it still doesn't find the three .dll. |
I thought I'd have a nose in signalflow.pyd hex to see what the dll paths were and found a lot of ascii error output related to JACK? Didn't expect to see that, i'm sure it's not related to this dll issue, but wasn't what I expected to find so sharing anyway. I just removed all C++ redistributable, removed python, removed visual studio, installed python, installed signalflow but still errors the module can't be found. |
Rolling back to signalflow 0.4.4 works on same system. I notice there's a soundio .dll in soundflow.libs that doesn't exist in the 0.5.1 latest version, but assume this is handled differently now? Then running pip install --upgrade signalflow to 0.5.1 appears to work too, it's just the fresh install directly to 0.5.1 has the issue? Weird.
|
That's so strange. You're right, soundio.dll shouldn't be needed anymore. I'm travelling at the moment, but will take a look at the DLLs sometime when I'm back at my Windows computer next week. |
Great stuff. Probably looking at differences between 0.4.4 > 0.5.1 pip upgrade versus a fresh 0.5.1 install might show the issue because the upgrade path (using .whl instead of pip) seems to work. |
I bumped into the same issue now using a conda env that used python 3.10. I tried to perform @hockinsk's hack, but then noticed that v0.4.4 is cpython 12 only. Then I scratched the whole env and recreated it with python 3.12, and signalflow 0.5.1 (latest at the time of writing) and everything works. So, afaik it is not the soundio.dll, because on my system no version other than 0.5.1 was ever installed. There seems to be something in the cp310_amd64 wheel that has an issue. |
@balintlaczko So this was Windows/conda/py3.10? Do you still have that env? I'd be interested in some diags if you're still able to reproduce the problem, particularly |
I I were to guess, it's JACK Audio Connection kit erroring while compiling signalflow.pyd and it's corrupted something, this is why upgrading from a working 0.4.4 to 0.5.1 seems to be fine, but installing directly to 0.5.1 simply isn't?? |
Hey @ideoforms, I did not have the env anymore, but I reproduced it now, and will keep it around in case you want me to check things, just let me know! Here is how I reproduced it:
For
For
UPDATE: I purged (I think) all the other python versions on the computer that were outside conda. I scratched and recreated the sftest env exactly the same way as described above. Everything is the same (including the ImportError), except the output for
|
@hockinsk I cannot install v0.4.4 on python 3.10, and it seems like the release is only for Cpython 3.12? But if I use python 3.12 then the latest version v.5.0.1 also works without issues. |
Yeah, v0.4.4 was a Windows test release that only targeted 3.12. v0.5.1 is the first proper cross-Python release for Windows. @balintlaczko Do you think you would be able to try running this utility on the different signalflow .pyd files in your 3.10 vs 3.12 conda envs? (A .pyd file is really just a DLL in disguise on Windows). This might shed light on which DLL it's failing to find. @hockinsk The warning messages about JACK when you look inside the binary are simply because SignalFlow now compiles with miniaudio as an include, so these are benign and expected. |
@ideoforms sure thing! This is what it shows for the failing env ("sftest") with python 3.10 And this is what I get in the env where it works ("pixasonics") with python 3.12 Not sure how to interpret this, but hope it helps! |
Interesting! The 3.10 build seems to be looking for Thanks so much for your help @balintlaczko, I will try to get a new build out as soon as I have the opportunity. |
Thanks a lot!!! (But as for my case, no rush! I'm fine using 3.12 in the env.) |
Thanks for all your help with this. I tracked this down to a silly issue in the build process, in which it sometimes bundled the wrong cached version of the .pyd file. 🤪 This should now be fixed! Could you please try installing the latest (0.5.2, Windows-only) release and let me know if this resolves the issue @balintlaczko @hockinsk @giohappy? |
Thanks for the fix, @ideoforms, this solved it for me! In the same "sftest" env that was failing before under python 3.10 I uninstalled the previous signalflow 0.5.1 and installed the new 0.5.2, and then imported signalflow without the dll error. Nice! |
Python 3.11.9 on Windows 11.
Signalflow fails when imprted.
This is the output when traced with
dlltracer
The libraries are correctly installed where the tracer reports them.
By the way, inspecting the pyd library it looks like it links tp Python 3.10. Maybe this is the problem?
The text was updated successfully, but these errors were encountered: