mit-acl / gym-collision-avoidance

MIT License
242 stars 75 forks source link

ModuleNotFoundError: No module named 'rvo2' #8

Closed BingHan0458 closed 3 years ago

BingHan0458 commented 3 years ago

hello, author, I initialize submodules, install dependencies and src code according to 'https://gym-collision-avoidance.readthedocs.io/en/latest/pages/install.html' and then I run './example.sh' and there is a bug: Entered virtualenv.

Running example python script

Traceback (most recent call last): File "src/example.py", line 6, in from gym_collision_avoidance.envs import test_cases as tc File "/home/hb/catkin_ws/src/rl_ca/gym-collision-avoidance/gym_collision_avoidance/envs/test_cases.py", line 21, in from gym_collision_avoidance.envs.policies.RVOPolicy import RVOPolicy File "/home/hb/catkin_ws/src/rl_ca/gym-collision-avoidance/gym_collision_avoidance/envs/policies/RVOPolicy.py", line 5, in import rvo2 ModuleNotFoundError: No module named 'rvo2' How to solve it? Thanks!

mfe7 commented 3 years ago

That error usually comes up when the python-rvo2 package wasn’t installed fully. When you ran the install.sh script, it had a line or two of setup.py for the RVO submodule - could you confirm that part suceeded?

On Fri, Dec 4, 2020 at 1:01 AM BingHan0458 notifications@github.com wrote:

hello, author, I initialize submodules, install dependencies and src code according to ' https://gym-collision-avoidance.readthedocs.io/en/latest/pages/install.html' and then I run './example.sh' and there is a bug: Entered virtualenv. Running example python script

Traceback (most recent call last): File "src/example.py", line 6, in from gym_collision_avoidance.envs import test_cases as tc File "/home/hb/catkin_ws/src/rl_ca/gym-collision-avoidance/gym_collision_avoidance/envs/test_cases.py", line 21, in from gym_collision_avoidance.envs.policies.RVOPolicy import RVOPolicy File "/home/hb/catkin_ws/src/rl_ca/gym-collision-avoidance/gym_collision_avoidance/envs/policies/RVOPolicy.py", line 5, in import rvo2 ModuleNotFoundError: No module named 'rvo2' How to solve it? Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mit-acl/gym-collision-avoidance/issues/8, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA22BJMO2EJT5N7UIRPCMX3STB3I7ANCNFSM4UM7Q3WA .

-- — Michael Everett Postdoctoral Associate MIT Department of Aeronautics and Astronautics mfe.mit.edu

BingHan0458 commented 3 years ago

When you ran the install.sh script, it had a line or two of setup.py for the RVO submodule - could you confirm that part suceeded?

Hello, author, when I ran the install.sh script, many times I got stuck in "Collecting git+https://github.com/openai/baselines.git@ea25b9e8b234e6ee1bca43083f8f3cf974143998 Cloning https://github.com/openai/baselines.git (to revision ea25b9e8b234e6ee1bca43083f8f3cf974143998) to /tmp/pip-req-build-lhemhsls" and it didn't go on. And 'the RVO submodule' didn't be install successfully. So what can I do for this bug?

mfe7 commented 3 years ago

Hmm i'm not sure why that would fail. That line is checking out a specific commit of the openai/baselines repo (which I just checked and it still exists on github), so maybe you could just clone the repo manually and checkout that commit hash? The commands in that install.sh should be possible to run individually, so it may be easier as you debug to activate the virtualenv and run the commands line by line

On Fri, Dec 4, 2020 at 9:18 AM BingHan0458 notifications@github.com wrote:

When you ran the install.sh script, it had a line or two of setup.py for the RVO submodule - could you confirm that part suceeded?

Hello, author, when I ran the install.sh script, many times I got stuck in "Collecting git+ https://github.com/openai/baselines.git@ea25b9e8b234e6ee1bca43083f8f3cf974143998 Cloning https://github.com/openai/baselines.git (to revision ea25b9e8b234e6ee1bca43083f8f3cf974143998) to /tmp/pip-req-build-lhemhsls" and it didn't go on. And 'the RVO submodule' didn't be install successfully. So what can I do for this bug?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mit-acl/gym-collision-avoidance/issues/8#issuecomment-738808324, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA22BJL6YU5CZBWGJCRAGMDSTDVS5ANCNFSM4UM7Q3WA .

-- Michael Everett Postdoctoral Associate Department of Aeronautics and Astronautics Massachusetts Institute of Technology (MIT) mfe.mit.edu

alimogharrebi commented 2 years ago

I had the same problem! No module named 'rvo2' I don't know how to solve this problem!

mfe7 commented 2 years ago

@alimogharrebi could you confirm that the rvo submodule installation succeeded during install.sh?

alimogharrebi commented 2 years ago

Thank you for your answer. I was finally able to solve the problem. I want to describe how this problem was solved, maybe it will be useful for others as well. The first problem was that I did not use --recursive when cloning. I learned this from your response to someone else. Because the setup.py file was not found when I ran install.sh file and I had to run it manually. After solving this issue and installing cmake and scipy manually, the problem was solved. Thank you so much for sharing your article code.