Skip to content
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

LCM 1.5.0 on Windows #456

Open
psi-jmonaco opened this issue May 26, 2023 · 2 comments
Open

LCM 1.5.0 on Windows #456

psi-jmonaco opened this issue May 26, 2023 · 2 comments

Comments

@psi-jmonaco
Copy link

LCM installs effortless under Linux. I was previously able to build LCM 1.4.0 under Windows using MSVC.

I now need a Windows build of LCM 1.5.0 with Python support under Anaconda and am following the recommendations to use MSYS2.

I can seemingly build everything fine using MSYS2 MINGW64 using either unix makefiles or ninja.

However, when I attempt to import lcm, the error below results. I have tried various ways to have the generated DLLs available, e.g. using os.add_dll_directory(...) within python, without success.

Any help is appreciated.


Python 3.10.9 | packaged by Anaconda, Inc. | (main, Mar 1 2023, 18:18:15) [MSC v.1916 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.

IPython 8.10.0 -- An enhanced Interactive Python.

import lcm
Traceback (most recent call last):

Cell In[1], line 1
import lcm

File ~\anaconda3\envs\lcm\lib\site-packages\lcm_init_.py:3
from lcm import _lcm

ImportError: DLL load failed while importing _lcm: The specified module could not be found.

@ihilt
Copy link
Contributor

ihilt commented Jun 8, 2023

I don't currently have the option of diving into this issue in an MSYS2 environment. However, it is interesting to me that it cannot find the Python module. The LCM Python module filename should be _lcm.so and it should be on PYTHONPATH. Is that file on your system somewhere? If so, try adding its path to PYTHONPATH (if it's not already) and try import lcm again. If it's not getting built at all, that's obviously a separate issue.

@nosracd
Copy link
Contributor

nosracd commented Sep 28, 2023

I tried to reproduce the issue on a Windows VM with MSYS2 MINGW64 but was unable to do so, unfortunately. You mentioned that everything built alright but have did you install before trying to import the Python module? Also make sure that you use the --prefix /mingw64/ when doing so. I also see that you're using Anaconda, which isn't something that's tested on CI. Could you try instead using a different version of Python? (I test locally with pacman's mingw-w64-x86_64-python package, for example).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants