-
-
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
Should OpenMM.dll be in conda/Library/bin rather than conda/Library/lib on Windows? #76
Comments
We used to add copies of the libs in %LIBRARY_BIN% to avoid overlinking errors during build, but at some point they disappeared, so we removed that workaround to reduce package size. IIRC, OpenMM expects libraries there... Check the contents of |
Thanks :-) |
I'm not an expert on Windows library handling. On Linux and Mac, |
I tried fixing this in openmm/openmm#3390, but it was rejected. |
Yes, but it's not because of how conda works. It's the convention on windows for any package irrespective of conda. |
But see openmm/openmm#3473. What is the value of |
|
This is the value of
This is a pretty vanilla cloud VM with just Visual Studio 2017 build tools, and Git installed centrally, and minimamba from conda-forge installed for local user use in |
Windows does things differently. Conda puts all of the DLLs into the bin directory, e.g.
The lib files are put in the lib directory
The OpenMM DLLs are the only DLLs in the lib directory.
|
How did you install OpenMM? That isn't any kind of path conda would have set for it. It would install OpenMM inside the |
It was a simple conda install openmm. The sire_app directory is just what I called my miniconda3 directory. |
Ok, I understand. Here's what's going on. When you install OpenMM through any mechanism (conda, build from source, etc.), it stores the path to wherever your libraries are in _path = os.environ['PATH']
os.environ['PATH'] = '%(lib)s;%(lib)s\plugins;%(path)s' % {
'lib': version.openmm_library_path, 'path': _path} This used to work correctly, but the CondaForge build of Python 3.10 changed the mechanism for loading libraries on Windows such that it no longer works. Instead you have to use a different mechanism, which we added in openmm/openmm#3473. os.add_dll_directory(version.openmm_library_path) That change will be in the next release. |
Thanks, that should work. It does feel though like it goes against the way Windows normally places its DLLs. These are normally in |
It's really independent of that. If building from source, the libraries might be in some totally different location, often inside |
Thanks for your time and help :-) |
Comment:
Thanks for creating a conda package that is also installable on Windows - it is really useful :-)
I am creating a package that builds on OpenMM and have run into the problem on Windows that my libraries cannot find OpenMM.dll at runtime. I believe this is because
OpenMM.dll
is installed intoconda_root\Library\lib
while I believe it should beconda_root\Library\bin
. I am not a Windows expert, so could be wrong, but I think the thelib
directory is for the.lib
files, while DLLs are treated like executables on Windows and need to be in the PATH to be loaded (so should be in thebin
directory).Moving
OpenMM.dll
intoconda_root\Library\bin
works for my package. Is this something that can be changed, or is there a reason to put the DLLs inlib
?Thanks :-)
The text was updated successfully, but these errors were encountered: