-
Notifications
You must be signed in to change notification settings - Fork 43
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
Windows setup via conda-forge not working ImportError: DLL load failed while importing _wrapper #219
Comments
Could you please list the contents of c:\Users\pichim\miniconda3\envs\pichim\lib\site-packages\slycot` ? It should contain Also, what happens if you just |
@bnavigator Thank you for your response.
Using Anaconda Power Shell Prompt as an administrator, activating the
|
I could reproduce this on my win10 virtual machine with an old miniconda installation. I tried upgrading and re-installing to no avail. A switch and pin to openblas was impossible due to some resolver conflicts. This may or may not be a bug in conda. Feel free to report it there. |
@bnavigator thanks a lot! i just red through conda-forge/blas-feedstock#106. i know i had python-control running on a windows machine about 1.5 years ago. and on our school we are trying to move away from Matlab. And since a lot of our students use windows it would be absolutely crucial that the tooling for control systems is working with windows either with pycharm or vscode and conda i think. So my question is, what is the current status and how can i support you? Again: I greatly appreciate your help and are really great full for your effort. If its somehow possible to use conda forge to install all relevant packages with an older version I would greatly appreciate if you could point me to a website or anything that describes how. |
Unfortunately I am lost myself. I have been at war with the conda resolver for way too long. Apparently the build on Windows creates a library (the _wrapper...pyd) which depends on other libraries that are not found or installed. |
@bnavigator do you think it would be worth creating an issue here: https://github.com/conda-forge/staged-recipes/issues? |
No I don't think that would be the right place. Please try to use this package as workaround and switch to openblas instead of mkl. It worked on my machine: conda_slycot-pr220_py39_py311_win-64.zip
(I used Python 3.9 because you have it in your original environment. Python 3.9 went out of SPEC0 this month, so you should upgrade soon.) Test if it works:
|
@bnavigator thank you very much! I tried to make this work with miniconda3 but quickly moved to miniforge. I will summarize what you recommended in case an other windows user wants to repeat it:
|
@bnavigator I also tested python 3.10 and 3.11 but mamba already failed here
for 3.10 and 3.11. Running the command without any argument for python results in python 3.9. Would be great if the above would also work for never versions of python at one point in time for windows users. Until then I'm more than happy that I can now use python-control. This is awesome! |
Glad it is working for you. When we merge conda-forge/slycot-feedstock#65 the workaround to switch to openblas should also be possible for all supported python versions with published conda-forge slycot packages. I am still not sure why the DLL can not be loaded with MKL libraries, but honestly I am tired of tracking it down using the inferior Windows and conda tooling. |
@bnavigator nice, happy to test if you ping me. |
The new Slycot conda package is on conda-forge now. |
The new Slycot conda package works on my Win10 VM both with mkl and openblas libraries (Python 3.12). 🎉 |
@bnavigator i will test this asap! Cheers mate! |
@bnavigator this is not related to windows directly. i'm experimenting with wsl ubuntu 22.04 and found that I could leave cygwin and msys2 behind when using vscode :-). of course i'm also testing python-control. Atm the following commands are resulting in a working conda environment:
but with python 3.12 the package instalaton fails. i have no idea if this is only with wsl or in general on linux distributions. I just thought maybe worth mentioning. I will now test with conda on windows. Edit: The above is only working if you force python=3.11. Creating a new environment without an argument creates now python 3.12, and then the package installation fails for me. Edit:
|
@bnavigator The workflow with the files conda_slycot-pr220_py39_py311_win-64.zip, mamba and python=3.11 is now working. |
@bnavigator Ok, mamba is also working with directly with and python=3.11 and python=3.12
|
@bnavigator To summarize this: WSL Ubuntu 22.04 using conda:
Windows using conda:
Windows using conda, the workflow above and the files conda_slycot-pr220_py39_py311_win-64.zip:
Windows using mamba:
So I would assume using mamba would also work for 3.12 on wsl. I will swap to mamba for now and use wsl in parallel also with mamba. Would be great if at one point in time the README.md of python-control and python-control slycot would get an extra entry with a description for windows users and maybe also a list with the last tested version and the exact tools that where tested to do this (both for linux users and windows users). Just an idea, i mean i have no idea about all that. My brain hurts now a bit... |
@bnavigator Ok, i cleaned up my mess, deinstalled everything that i think is not needed, started from scratch and tried only what i think is working and usefull for other users in the future. The following is working for me on windows10 as well as on wsl ubuntu 22.04 on windows10 where i use on both sides https://github.com/conda-forge/miniforge only conda to manage virtual environments and packages:
Now i can run the examples But in the end with this workflow pyhon-control can now be used on windows10 as well as wsl on windows10 using miniforge for packaging and vscode for execution. Thank you very much! |
@pichim and @bnavigator Thank you both for all this effort, it has been a life saver. Similar to pichim, we are using this for a Controls course, so this has been a major problems with students on different Anaconda versions (Python 3.9 works, 3.10 & 3.11 fail). For those that may read this later, I've updated @pichim's example slightly for those completely new to Conda channels. This is an example for Python 3.11, and also works for Python 3.10 (obvious changes required).
Better yet, if you already have a base install that fails to
Then test if |
Thank you for your feedback! As mentioned before, I am at a loss how to debug the windows DLL loader issues and have no idea how to find the cause why some (old?) conda packages do not work anymore. Any suggestions welcome. |
If you open an issue on the feedstock and ask the appropriate conda forge team for help, maybe they have some insight. |
just tested:
using miniforge3. so python 3.10 is now fully functional on windows (have not tested wsl) |
Hi everybody
I would like to test and evaluate the package to eventually leave Matlab behind for my control systems class. Currently I'm using Windows 10. To make the error reproducible i created a fresh and clean local user and installed miniconda3 and vscode only.
The exact commands in miniconda3 were:
I then run vscode with the python and jupyter extensions (packs) with the conda enviroment
pichim
. The examplephaseplots.py
is working fine, others using more sophisticated tooling from python-control includingslycot
do not. E.g.cruise.ipynb
is working fine, whereasrobustsiso.py
do not.I get the error:
Listing the packages from the conda environment with
conda list -n pichim
produces the following output:I greatly appreciate what you are doing, big respect!
The text was updated successfully, but these errors were encountered: