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

Broken imports on fresh install via pip #222

Open
Iemontine opened this issue Dec 29, 2024 · 4 comments
Open

Broken imports on fresh install via pip #222

Iemontine opened this issue Dec 29, 2024 · 4 comments

Comments

@Iemontine
Copy link

Iemontine commented Dec 29, 2024

This could be due to an issue for which python version I ignorantly used (3.10.6) when starting up but I was getting the following errors when running the example stable_baselines3_example.py. I'm relatively new to RL so if there's just an unspoken version that everyone should be using let me know haha-- in either case I'm a big fan of providing which version of python this is intended for development within the README.md.
ImportError: cannot import name 'export_model_as_onnx' from 'godot_rl.wrappers.onnx.stable_baselines_export'
and
ImportError: cannot import name 'spaces' from 'gymnasium.vector.utils'

The first error is due to export_model_as_onnx being renamed as export_ppo_model_as_onnx in the most recent version (0.8.1?), solved by renaming:

from godot_rl.wrappers.onnx.stable_baselines_export import export_model_as_onnx 

to

from godot_rl.wrappers.onnx.stable_baselines_export import export_ppo_model_as_onnx

The second error was hackily resolved by adding the spaces source into the imported directory manually (https://gymnasium.farama.org/main/_modules/gymnasium/vector/utils/spaces/)

@Ivan-267
Copy link
Collaborator

Ivan-267 commented Dec 29, 2024

Hello, try installing using pip install https://github.com/edbeeching/godot_rl_agents/archive/refs/heads/main.zip. That should install the newest version and the errors should be fixed (you may need to remove the previous installation with pip uninstall if the above doesn't resolve the issue). Once a new release is made, the standard pip install godot-rl command should work again.

The newest Python version we test with is 3.10.10.
Edit: I'll also pin the issue for now as it might be useful for others.

@Ivan-267 Ivan-267 pinned this issue Dec 29, 2024
@3126872157
Copy link

Hello, try installing using pip install https://github.com/edbeeching/godot_rl_agents/archive/refs/heads/main.zip. That should install the newest version and the errors should be fixed (you may need to remove the previous installation with pip uninstall if the above doesn't resolve the issue). Once a new release is made, the standard pip install godot-rl command should work again.

The newest Python version we test with is 3.10.10. Edit: I'll also pin the issue for now as it might be useful for others.

U save me!thanks
Installing the newest version works.

@edbeeching
Copy link
Owner

@Ivan-267 should I release a new version?

@Ivan-267
Copy link
Collaborator

@edbeeching Yes, that would help with the installation now that we merged the PRs. For now we can limit versions when we run into compatibility issues as we did with Rllib, and then slowly add support for newer versions.

We can close this issue after the release.

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