geek-ai / MAgent

A Platform for Many-Agent Reinforcement Learning
MIT License
1.69k stars 332 forks source link

Cannot Run On Ubuntu18 #50

Closed ainilaha closed 4 years ago

ainilaha commented 5 years ago

$python examples/train_pursuit.py --train Traceback (most recent call last): File "examples/train_pursuit.py", line 11, in import magent ModuleNotFoundError: No module named 'magent'

laha@laha-unbutun:$ uname -a Linux laha-unbutun 4.18.0-12-generic #13-Ubuntu SMP Wed Nov 14 15:17:05 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux laha@laha-unbutun:$ g++ --version g++ (Ubuntu 8.2.0-7ubuntu1) 8.2.0 Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

laha@laha-unbutun:~$ cmake --version cmake version 3.12.1

CMake suite maintained and supported by Kitware (kitware.com/cmake).

ainilaha commented 5 years ago

I have try to re-run the build.sh $ bash build.sh -- The C compiler identification is GNU 8.2.0 -- The CXX compiler identification is GNU 8.2.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done -- Generating done -- Build files have been written to: /media/sf_Downloads/MAgent/build make: Warning: File 'Makefile' has modification time 0.73 s in the future make[1]: Warning: File 'CMakeFiles/Makefile2' has modification time 0.64 s in the future make[2]: Warning: File 'CMakeFiles/render.dir/flags.make' has modification time 0.64 s in the future Scanning dependencies of target render make[2]: warning: Clock skew detected. Your build may be incomplete. make[2]: Warning: File 'CMakeFiles/render.dir/flags.make' has modification time 0.44 s in the future [ 3%] Building CXX object CMakeFiles/render.dir/src/render/backend/data.cc.o [ 6%] Building CXX object CMakeFiles/render.dir/src/render/backend/render.cc.o [ 9%] Building CXX object CMakeFiles/render.dir/src/render/backend/text.cc.o [ 12%] Building CXX object CMakeFiles/render.dir/src/render/backend/utility/config.cc.o [ 15%] Building CXX object CMakeFiles/render.dir/src/render/backend/utility/logger.cc.o [ 18%] Building CXX object CMakeFiles/render.dir/src/render/backend/websocket.cc.o [ 21%] Linking CXX executable render/render make[2]: warning: Clock skew detected. Your build may be incomplete. [ 21%] Built target render Scanning dependencies of target magent make[2]: Warning: File 'CMakeFiles/magent.dir/depend.make' has modification time 1.1 s in the future [ 24%] Building CXX object CMakeFiles/magent.dir/src/discrete_snake/DiscreteSnake.cc.o [ 27%] Building CXX object CMakeFiles/magent.dir/src/discrete_snake/Map.cc.o [ 30%] Building CXX object CMakeFiles/magent.dir/src/discrete_snake/RenderGenerator.cc.o [ 33%] Building CXX object CMakeFiles/magent.dir/src/gridworld/AgentType.cc.o [ 36%] Building CXX object CMakeFiles/magent.dir/src/gridworld/GridWorld.cc.o [ 39%] Building CXX object CMakeFiles/magent.dir/src/gridworld/Map.cc.o /media/sf_Downloads/MAgent/src/gridworld/Map.cc: In member function ‘void magent::gridworld::Map::render()’: /media/sf_Downloads/MAgent/src/gridworld/Map.cc:621:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] for (int x = 0; x < w; x++) ^~~ /media/sf_Downloads/MAgent/src/gridworld/Map.cc:622:29: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ printf("="); puts(""); ^~~~ /media/sf_Downloads/MAgent/src/gridworld/Map.cc:624:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] for (int x = 0; x < w; x++) ^~~ /media/sf_Downloads/MAgent/src/gridworld/Map.cc:625:29: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ printf("%2d ", x); puts(""); ^~~~ /media/sf_Downloads/MAgent/src/gridworld/Map.cc:672:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] for (int x = 0; x < w; x++) ^~~ /media/sf_Downloads/MAgent/src/gridworld/Map.cc:673:29: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ printf("="); puts("\n"); ^~~~ [ 42%] Building CXX object CMakeFiles/magent.dir/src/gridworld/RenderGenerator.cc.o [ 45%] Building CXX object CMakeFiles/magent.dir/src/gridworld/RewardEngine.cc.o [ 48%] Building CXX object CMakeFiles/magent.dir/src/gridworld/test.cc.o [ 51%] Building CXX object CMakeFiles/magent.dir/src/runtime_api.cc.o [ 54%] Building CXX object CMakeFiles/magent.dir/src/temp_c_booster.cc.o [ 57%] Building CXX object CMakeFiles/magent.dir/src/utility/utility.cc.o [ 60%] Linking CXX shared library libmagent.so make[2]: warning: Clock skew detected. Your build may be incomplete. [ 60%] Built target magent Scanning dependencies of target testlib make[2]: Warning: File 'CMakeFiles/testlib.dir/depend.make' has modification time 0.71 s in the future [ 63%] Building CXX object CMakeFiles/testlib.dir/src/discrete_snake/DiscreteSnake.cc.o [ 66%] Building CXX object CMakeFiles/testlib.dir/src/discrete_snake/Map.cc.o [ 69%] Building CXX object CMakeFiles/testlib.dir/src/discrete_snake/RenderGenerator.cc.o [ 72%] Building CXX object CMakeFiles/testlib.dir/src/gridworld/AgentType.cc.o [ 75%] Building CXX object CMakeFiles/testlib.dir/src/gridworld/GridWorld.cc.o [ 78%] Building CXX object CMakeFiles/testlib.dir/src/gridworld/Map.cc.o /media/sf_Downloads/MAgent/src/gridworld/Map.cc: In member function ‘void magent::gridworld::Map::render()’: /media/sf_Downloads/MAgent/src/gridworld/Map.cc:621:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] for (int x = 0; x < w; x++) ^~~ /media/sf_Downloads/MAgent/src/gridworld/Map.cc:622:29: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ printf("="); puts(""); ^~~~ /media/sf_Downloads/MAgent/src/gridworld/Map.cc:624:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] for (int x = 0; x < w; x++) ^~~ /media/sf_Downloads/MAgent/src/gridworld/Map.cc:625:29: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ printf("%2d ", x); puts(""); ^~~~ /media/sf_Downloads/MAgent/src/gridworld/Map.cc:672:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] for (int x = 0; x < w; x++) ^~~ /media/sf_Downloads/MAgent/src/gridworld/Map.cc:673:29: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ printf("="); puts("\n"); ^~~~ [ 81%] Building CXX object CMakeFiles/testlib.dir/src/gridworld/RenderGenerator.cc.o [ 84%] Building CXX object CMakeFiles/testlib.dir/src/gridworld/RewardEngine.cc.o [ 87%] Building CXX object CMakeFiles/testlib.dir/src/gridworld/test.cc.o [ 90%] Building CXX object CMakeFiles/testlib.dir/src/runtime_api.cc.o [ 93%] Building CXX object CMakeFiles/testlib.dir/src/temp_c_booster.cc.o [ 96%] Building CXX object CMakeFiles/testlib.dir/src/utility/utility.cc.o [100%] Linking CXX executable testlib make[2]: warning: Clock skew detected. Your build may be incomplete. [100%] Built target testlib make[1]: warning: Clock skew detected. Your build may be incomplete. make: warning: Clock skew detected. Your build may be incomplete.

Kipsora commented 5 years ago

It seems that your build logs are alright except several warnings. Have you executed export PYTHONPATH=$(pwd)/python:$PYTHONPATH?