Caltech-AMBER / ambersim

In-house tools built on GPU-accelerated simulation
MIT License
7 stars 2 forks source link

Fix `mujoco.viewer` import order bug #44

Closed vincekurtz closed 10 months ago

vincekurtz commented 10 months ago

I was having an issue with mujoco.viewer and jax in a source install, where everything was fine with the following import order:

import mujoco
import mujoco.viewer
import jax

But a different order,

import jax
import mujoco
import mujoco.viewer

threw a mysterious GLIBCXX_3.4.30 not found error.

It turns out the problem has to do with miniconda3 using some old c++ libraries by default. This PR fixes the problem by including gxx_linux-64 as an explicit conda dependency. It then reverts the import order hacks I used to get around the issue before.

vincekurtz commented 10 months ago

LGTM, nice job looking for this. Just curious, did you test this on a fresh env?

Yup, tested on a fresh env and a fresh mujoco source copy