Issue with Importing _sensor and _pardisomkl - Pychrono

68 views
Skip to first unread message

Space Praesidium

unread,
Mar 27, 2025, 2:47:41 AM3/27/25
to ProjectChrono
I have built a pychrono environment in anaconda following these instructions exactly: https://api.projectchrono.org/pychrono_installation.html 

Most of the demos work except for those which use the _sensor and _pardisomkl parts of chrono. when I attempt to run these demos I get the following error: 

ImportError: cannot import name '_sensor' from 'pychrono' 

or the exact same error but instead of _sensor it is _pardisomkl

I cannot figure out how to fix this issue. I found this forum post from a while back: https://groups.google.com/g/projectchrono/c/y_SceBNVtos/m/cbTSIn2sBwAJ  and tried installing the Cuda toolkit manually as it seemed to work for that user, but this did not resolve my issue. 

as a note I have built a pychrono environment both in python 3.9 and 3.10 and experienced this same issue, and I would prefer to build and work in python 3.10 if possible. I do not require cascade support for the work I am doing and so I think 3.10 is not the issue for that environment, and I have the same issue in the 3.9 environment. 

Thanks
Tyler 

Radu Serban

unread,
Mar 27, 2025, 3:01:36 AM3/27/25
to ProjectChrono

Hi Tyler,

 

When asking questions about Chrono, especially when discussing installation or build-related issues, it is important to provide more details, as applicable, including operating system, relevant details on compilers, version of Chrono (or PyChrono), etc.

 

Having said that, please note that we have recently completed a large refactoring job that affected the Chrono CMake configuration and build system. We are still working through some left-over tasks related to those changes and that includes creating new conda packages. 

 

Until that is done, and if this is a possibility for you, I strongly encourage you to build your own PyChrono packages, by configuring and building Chrono from scratch and including whatever Chrono modules you are interested in.  Of course, that implies a bit more work on your side (getting all prerequisites if not already available, obtaining the necessary dependencies, etc.), but that would give you full control.  For that, start at https://api.projectchrono.org/tutorial_install_chrono.html and then look at https://api.projectchrono.org/module_python_installation.html.

 

Otherwise, you will need to wait a little bit longer until we get to creating and distributing new conda packages. As you see from https://anaconda.org/projectchrono/pychrono/files, we have not done that in quite a while and it would be a bit pointless to try to figure out issues with packages that are that old (and will be soon obsolete).

 

Best,
Radu

--
You received this message because you are subscribed to the Google Groups "ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email to projectchron...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/projectchrono/e2d34615-0850-49a8-a7d0-dccbf71b176an%40googlegroups.com.

Space Praesidium

unread,
Mar 27, 2025, 10:39:58 AM3/27/25
to ProjectChrono
Thanks Radu for the quick and informative response! 

I am working on a windows 10 machine running version 10.0.19045. It is on a laptop which is equipped with an Nvidia GPU (A1000). Nvidia driver version is 572.61. 

The specific pychrono version I have tried installing is  win-64/pychrono-9.0.1-py310_5372.tar.bz2 for Python 3.10 and  win-64/pychrono-9.0.1-py39_5372.tar.bz2 for python 3.9. I have also tried pychrono version 8.0.0 in python 3.9 and it has the same issue.  

As far as versions of other libraries from the pychrono install tutorial page I exactly copy pasted what was there, with the exception of GNUplot which I did not install. 

as a note trying to make a new environment I went through the instructions completely from scratch again and now pardisomkl is working in both versions, so I suspect there was some sort of issue installing mkl. I still cannot use the _sensor module though.

Unfortunately installing myself would be difficult given install permissions given that I am using a IT controlled computer and getting approval for even just pychrono through anaconda took quite a bit of doing and time (about a month).  

What other information can I help provide to diagnose the issue with _sensor? I suspect there is some sort of issue with either my dependencies like CUDA or chrono itself. I have attached an .txt file with a list of all installed packages for the python 3.10 install for which _sensor is not working. 
 


chrono installed files.txt
Reply all
Reply to author
Forward
0 new messages