SDL2 Library Error while running PyChrono

128 views
Skip to first unread message

Nnamdi Chikere

unread,
Jul 28, 2025, 5:22:16 PMJul 28
to ProjectChrono
Hello,

I have recently been faced with an error whenever I try to run any Python programs in PyChrono. Has anyone encountered this before? I use Visual Studio Code and Pychrono 9.0.1 on a Windows PC. I followed all the steps for installing Pychrono in a virtual environment. I have tried uninstalling and reinstalling, but it hasn't helped. Everything worked fine in the same env, this error just appeared suddenly. Please, I would like some advice on this.

Best regards

Screenshot 2025-07-28 171544.png

Bocheng Zou

unread,
Jul 30, 2025, 12:18:25 PMJul 30
to projec...@googlegroups.com

Hi Nnamdi,

Thank you for reaching out. I'm Bocheng and I'm a UW-Madison student responsible for PyChrono distributions. Could you please clarify the specific way you install the PyChrono? We currently support three ways of installation on Windows.

A. Build from scratch using cmake (ref: https://api.projectchrono.org/tutorial_install_chrono.html)

B. Precompiled binaries for Windows (ref: https://projectchrono.org/download/)

C. PyChrono through Conda (ref: https://api.projectchrono.org/pychrono_installation.html)

Could you please specify the way you install the chrono? This will be helpful for us to investigate the issue further. 

Best,

Bocheng Zou

--
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/1f41206d-20f1-48dd-bd2e-73c48d2665fbn%40googlegroups.com.

Nnamdi Chikere

unread,
Jul 30, 2025, 8:45:38 PMJul 30
to ProjectChrono
Hello Bocheng,

Thank you for reply. 
I installed PyChrono via method C. PyChrono through Conda (ref: https://api.projectchrono.org/pychrono_installation.html)
For the last step I installed via  conda install pychrono-9.0.1-py310_5372.tar.bz2

Best regards,
Nnamdi

Bocheng Zou

unread,
Jul 30, 2025, 8:49:26 PMJul 30
to projec...@googlegroups.com

Hi Nnamdi,

Thank you for providing the information. The Windows conda build for PyChrono is having know issues recently. We are aware of that and it's expected to be fixed within the week. If you are in urgent need of PyChrono, I suggest you build from scratch using cmake (Method A) or use PyChrono's conda distribution on Linux.

I will keep you posted once the issue in the Windows conda distribution is fixed. 

Best,

Bocheng Zou

Bocheng Zou

unread,
Aug 1, 2025, 10:17:21 PMAug 1
to projec...@googlegroups.com

Hi Nnamdi,

I hope you're doing well.
We're excited to share that we've refactored the Conda build pipeline and released updated distributions of PyChrono with improved cross-platform compatibility, which is likely to resolve the issue you encountered.
To try out the latest release, please create a new environment and run the following commands (note that the installation command on the website is now oudated):

conda create -n chrono_test python=3.12 -c conda-forge

conda install pychrono -c projectchrono -c dlr-sc -c conda-forge

Please let us know if there are any remaining issues. 
Best,

Bocheng Zou

Nnamdi Chikere

unread,
Aug 4, 2025, 1:58:27 PMAug 4
to ProjectChrono
Hi Bocheng,

It now works, but it broke certain parts of my code. Seems some of the API and syntax have changed in this version. I noticed changes in the SCM
  terrain = veh.SCMTerrain(sys)
    # rotate plane
    terrain.SetReferenceFrame(chrono.ChCoordsysd(
        chrono.ChVector3d(0, scm_plane_y, 0),
        chrono.QuatFromAngleX(-math.pi / 2)
    ))

    # Previous version used:
    terrain.SetPlane(chrono.ChCoordsysd(
        chrono.ChVector3d(0, scm_plane_y, 0),
        chrono.QuatFromAngleX(-math.pi / 2))
    )


Upon updating to the new version, I am now faced with a new error when running the deformable soil ... 
Cannot open colormap data file C:/Users/chike/Box/TurtleRobotExperiments/Sea_Turtle_Robot_AI_Powered_Simulations_Project/NnamdiFiles/mujocotest1/chrono/data../data/colormaps/jet-table-float-0512.csv
I have the data path correctly specified at the top of my code using the chrono.SetChronoDataPath()
And upon contact with the ground, the window crashes. Do you happen to have any fixes for this? Also, are there any other changes to the syntax?

Best regards,
Nnamdi

Bocheng Zou

unread,
Aug 4, 2025, 2:07:48 PMAug 4
to projec...@googlegroups.com

Hi Nnamdi,

Thank you for the follow up. Yes, on Apr 27, 2025, we renamed SetPlane to SetReferenceFrame. The details can be found at https://github.com/projectchrono/chrono/commit/59e3cb4ba24dbb258aa1543a971507a7d0bf2689

For the "Cannot open colormap data file C:/Users/chike/Box/TurtleRobotExperiments/Sea_Turtle_Robot_AI_Powered_Simulations_Project/NnamdiFiles/mujocotest1/chrono/data../data/colormaps/jet-table-float-0512.csv" issue, did you put a "/" character at the end of your "chrono.SetChronoDataPath()" call? For example, you need to use chrono.SetChronoDataPath("C:/Users/chike/Box/TurtleRobotExperiments/Sea_Turtle_Robot_AI_Powered_Simulations_Project/NnamdiFiles/mujocotest1/chrono/data/") instead of chrono.SetChronoDataPath("C:/Users/chike/Box/TurtleRobotExperiments/Sea_Turtle_Robot_AI_Powered_Simulations_Project/NnamdiFiles/mujocotest1/chrono/data")

Once you applied that fix, could you please update on if the window crash issue gets resolved?

Thank you very much!

Best,

Bocheng Zou

Nnamdi Chikere

unread,
Aug 4, 2025, 2:14:13 PMAug 4
to ProjectChrono
Thank you very much. Adding the "/" character resolved the issue. Does this version include the capability to simulate granular systems on Windows using Python?

Best regards,
Nnamdi

Dan Negrut

unread,
Aug 4, 2025, 2:24:42 PMAug 4
to Nnamdi Chikere, ProjectChrono

That functionality for running granular problems from python: see pyDEME, https://github.com/projectchrono/DEM-Engine.

We’ll probably have one integrated way to install everything (chrono & DEM support) coming up in the very near future – next three months, most likely. That’ll be through conda forge, a one line command, hopefully.

Dan

---------------------------------------------

Bernard A. and Frances M. Weideman Professor

NVIDIA CUDA Fellow

Department of Mechanical Engineering

Department of Computer Science

University of Wisconsin - Madison

4150ME, 1513 University Avenue

Madison, WI 53706-1572

608 772 0914

http://sbel.wisc.edu/

http://projectchrono.org/

---------------------------------------------

--


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/1f41206d-20f1-48dd-bd2e-73c48d2665fbn%40googlegroups.com.

--
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/8b5c5803-6308-461f-a84b-24188f960344n%40googlegroups.com.

--
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.

--
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.

Bocheng Zou

unread,
Aug 4, 2025, 2:45:09 PMAug 4
to projec...@googlegroups.com

Hi Dan and Nnamdi,

To add up, since the FSI and VSG support is not yet merged into the main branch, if you want to use the PyChrono with FSI / VSG to simulate granular terrain in addition to DEME, you need to use our special FSI version rather than the regular version I posted in previous email. The special FSI version can be installed via the following command in a NEW environment:

conda create -n chrono_test "python<3.13" -c conda-forge
conda install bochengzou::pychrono -c bochengzou -c nvidia -c dlr-sc -c conda-forge

Best,

Bocheng

Nnamdi Chikere

unread,
Aug 4, 2025, 3:20:23 PMAug 4
to ProjectChrono
Thank you so much for your replies. 
@Bocheng, I created an environment following the steps you outlined and from the GitHub page to install the Py-DEME I followed these steps 

conda install cmake
pip3 install DEME

 I got these errors.
(chrono_test2) conda install cmake                                                                                                                                            
Channels:                                                                                                                                        
 - conda-forge                                                                                                                                    
 - defaults
Platform: win-64
Collecting package metadata (repodata.json): done
Solving environment: done

  cmake              conda-forge/win-64::cmake-4.0.3-hff78f93_0
  libuv              conda-forge/win-64::libuv-1.51.0-hfd05255_1


Proceed ([y]/n)? y
Downloading and Extracting Packages:
Preparing transaction: done                                                                                                                      
Verifying transaction: done
Executing transaction: done

(chrono_test2) pip3 install DEME
Collecting DEME
  Using cached deme-2.1.2.tar.gz (6.9 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [33 lines of output]
      Traceback (most recent call last):
        File "C:\Users\chike\anaconda3\envs\chrono_test2\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 389, in <module>
          main()
        File "C:\Users\chike\anaconda3\envs\chrono_test2\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 373, in main
          json_out["return_val"] = hook(**hook_input["kwargs"])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\chike\anaconda3\envs\chrono_test2\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 137, in get_requires_for_build_wheel
          backend = _build_backend()
                    ^^^^^^^^^^^^^^^^
        File "C:\Users\chike\anaconda3\envs\chrono_test2\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 70, in _build_backend
          obj = import_module(mod_path)
                ^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\chike\anaconda3\envs\chrono_test2\Lib\importlib\__init__.py", line 90, in import_module
          return _bootstrap._gcd_import(name[level:], package, level)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
        File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
        File "<frozen importlib._bootstrap>", line 1310, in _find_and_load_unlocked
        File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
        File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
        File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
        File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
        File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
        File "<frozen importlib._bootstrap_external>", line 999, in exec_module
        File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
        File "C:\Users\chike\AppData\Local\Temp\pip-build-env-pw8idr9h\overlay\Lib\site-packages\setuptools\__init__.py", line 17, in <module>    
          import setuptools.version
        File "C:\Users\chike\AppData\Local\Temp\pip-build-env-pw8idr9h\overlay\Lib\site-packages\setuptools\version.py", line 1, in <module>      
          import pkg_resources
        File "C:\Users\chike\AppData\Local\Temp\pip-build-env-pw8idr9h\overlay\Lib\site-packages\pkg_resources\__init__.py", line 2163, in <module>
          register_finder(pkgutil.ImpImporter, find_on_path)
                          ^^^^^^^^^^^^^^^^^^^
      AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.


Are there separate steps for installing on Windows?


Best regards,
Nnamdi

Bocheng Zou

unread,
Aug 4, 2025, 4:44:53 PMAug 4
to projec...@googlegroups.com

Hi Nnamdi,

Thank you for bringing that issue to our attention. The Py-DEME's building pipeline is not stable on Windows at this moment.  We suggest you try to build from source or use WSL . 

We will likely to bring up a conda package for PyDEME for Windows to make this process much easier this week.

If you intend to reproduce the results that you asked Harry for in another email chain, https://groups.google.com/g/projectchrono/c/fWYnvZKkT4g , Py-DEME is not required and you can just follow the instruction in Harry's github. 

I will keep you posted on Py-DEME's Windows conda package. 

Best,

Bocheng Zou

Nnamdi Chikere

unread,
Aug 6, 2025, 3:36:35 PMAug 6
to ProjectChrono
Thank you so much. I am looking forward to the PyDEME conda package this week.

Best regards,
Nnamdi

Bocheng Zou

unread,
Aug 21, 2025, 10:12:16 PMAug 21
to projec...@googlegroups.com

Hi Nnamdi,

Sorry for the long delay. We have released the test version of PyDEME through conda . Please try installing the PyDEME through the following command in a NEW environment created using "conda create -n tutorial "python<3.13" -c conda-forge". 

conda install bochengzou::pydeme -c bochengzou -c nvidia -c dlr-sc -c conda-forge

Let me know if you encounter any issues. 

Best,

Bocheng Zou

Nnamdi Chikere

unread,
Aug 22, 2025, 1:12:29 PMAug 22
to Bocheng Zou, projec...@googlegroups.com
Thank you very much. I will try it out and let you know if I have any problems.

Best regards,
Nnamdi

Nnamdi Chikere

unread,
Aug 22, 2025, 1:47:21 PMAug 22
to Bocheng Zou, projec...@googlegroups.com
Hi Bocheng, 

I realized this "conda install bochengzou::pydeme -c bochengzou -c nvidia -c dlr-sc -c conda-forge" does not contain the pychrono package. Will I have to install it separately? And is there an order to the installation?

Best regards,
Nnamdi

Bocheng Zou

unread,
Aug 22, 2025, 2:02:16 PMAug 22
to projec...@googlegroups.com

Hi Nnamdi,

You can run this command along with the pychrono installation command I sent to you previously in the same environment. The order doesn't matter. You can also install it in your original pychrono environment (given that the environment is clean and doesn't contain pip installed DEME package).

Please note that due to a VSG upstream issue on conda-forge, you might not be able to install pychrono in the new environment today since it requires pulling packages from conda-forge. 

Best,

Bocheng Zou

Reply all
Reply to author
Forward
0 new messages