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

Package jaxsim pulled from conda-forge raises error because of conflct with new Jax update #118

Closed
lorycontixd opened this issue Mar 22, 2024 · 6 comments
Assignees

Comments

@lorycontixd
Copy link
Contributor

The dependency from Jax listed in the environment.yml file is not correct for a conda-forge installation, as it conflicts with a newer update of the Jax library.

Error

The error is:
ImportError: cannot import name 'config' from 'jax.config'
from file src/jaxsim/__init__.py: line 9

How to reproduce

  • The requirements.txt file contains the output of conda list:
  • conda version: 23.11.0

Possible solution

Require jax version to be < 0.4.25 in environment.yml

@diegoferigo
Copy link
Member

diegoferigo commented Mar 22, 2024

Hi @lorycontixd, thanks for reporting! Yes you are right, jax >= 0.4.25 removed jax.config and we used to use it in our __init__.py. Our main branch has been already fixed in #92, but we still need to make a new release and propagate it to conda-forge.

We are soon releasing a new v0.2.0 with brand new APIs (follow #108 for more details). If you are starting any kind of exploration with JaxSim, I warmly recommend to install a development version from the functional branch. Code based on v0.1.0 will no longer run on v0.2.0, and it would need major updates.

@traversaro
Copy link
Contributor

I guess that in the case of the functional branch, if you want to install jaxsim from source in a conda environment, you can use the environment.yml file, right @diegoferigo ?

In that the installation is basically:

git clone https://github.com/ami-iit/jaxsim -b functional
conda create -f ./jaxsim/environment.yml
conda activate jaxsim
pip install -e --no-deps ./jaxsim

@diegoferigo
Copy link
Member

diegoferigo commented Mar 22, 2024

That file is pretty new and currently is used only by ReadTheDocs. It should contain all the JaxSim dependencies, yes, thanks for pointing that out, it's a good idea.

We should include this information in the new README of the v0.2.0 version, I think that it's quite useful for all downstream users that want to use a development version of JaxSim, or want to create an environment for proposing a new feature / bug fixing.

@diegoferigo
Copy link
Member

diegoferigo commented Apr 3, 2024

Should get fixed by conda-forge/jaxsim-feedstock#2.

@flferretti
Copy link
Collaborator

PR merged, closing

@traversaro
Copy link
Contributor

Great!

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

4 participants