openai / maddpg

Code for the MADDPG algorithm from the paper "Multi-Agent Actor-Critic for Mixed Cooperative-Competitive Environments"
https://arxiv.org/pdf/1706.02275.pdf
MIT License
1.6k stars 484 forks source link

add multiagent-particle-envs to PYTHONPATH #4

Closed djbitbyte closed 6 years ago

djbitbyte commented 6 years ago

Hello, thanks for implement of this algorithm! I tried to run train.py, but it complains: Traceback (most recent call last): File "train.py", line 9, in import maddpg.common.tf_util as U ImportError: No module named common.tf_util

I am suspicious that I did not correctly add multiagent-particle-envs to PYTHONPATH. I git cloned multiagent-particle-envs and maddpg into the same folder, and tried command of "export PYTHONPATH=$PYTHONPATH:/home/user/path/multiagent-particle-envs" in terminal, but it still gave me the same error.

ryan-lowe commented 6 years ago

Hi, If you go into python and just type 'import maddpg', does that work? If not, you didn't add maddpg to your pythonpath correctly. (The line you wrote will add multiagent to the pythonpath, but not maddpg, since it is in a different folder.)

nanxintin commented 6 years ago

@djbitbyte @ryan-lowe I have the same error when running the train.py. In addition, I add the maddpg and MPE to the PYTHONPATH (in ~/.bashrc), but it still failed. Could you give me some suggestions?

djbitbyte commented 6 years ago

@nanxintin I created a new conda virtual environment to have it up running. Not sure why it did not work in my old virtual env, could be that many other installed packages affect it from working correctly.

StevenS963 commented 3 years ago

you can use echo $PYTHONPATH to check your python path, if your maddpg path didn't show in the path, it won't work