eugenevinitsky / sequential_social_dilemma_games

Repo for reproduction of sequential social dilemmas
MIT License
380 stars 134 forks source link

lots of error when running "python -m pytest" #164

Open TianChenone opened 4 years ago

TianChenone commented 4 years ago

My environment: ubuntu 16.04 causal (anaconda environment) python 3.6.7 ; tensorflow-gpu 1.12.0 ; ray 0.7.2(firstly I pip install the ray of version 0.6.1 as the instruction, there are also lots of error, so I shift the version to 0.7.2) When I running "python -m pytest", there are lots of errors below(showing part of errors)

ImportError while importing test module '/home/wsw/cyt_DRL/paper_code/sequential_social_dilemma_games-master/ray/python/ray/tests/test_actor.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: ../../../anaconda2/envs/causal/lib/python3.6/site-packages/ray/tests/test_actor.py:20: in from ray.tests.utils import ( E ImportError: cannot import name 'relevanterrors' ____ ERROR collecting ray/python/ray/tests/test_array.py __ import file mismatch: imported module 'ray.tests.test_array' has this file attribute: /home/wsw/anaconda2/envs/causal/lib/python3.6/site-packages/ray/tests/test_array.py which is not the same as the test file we want to collect: /home/wsw/cyt_DRL/paper_code/sequential_social_dilemma_games-master/ray/python/ray/tests/test_array.py HINT: remove pycache / .pyc files and/or use a unique basename for your test file modules ____ ERROR collecting ray/python/ray/tests/testcython.py ____ ImportError while importing test module '/home/wsw/cyt_DRL/paper_code/sequential_social_dilemma_games-master/ray/python/ray/tests/test_cython.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: ../../../anaconda2/envs/causal/lib/python3.6/site-packages/ray/tests/test_cython.py:9: in import cython_examples as cyth E ModuleNotFoundError: No module named 'cython_examples'


I think some of error like "cannot import ....module" is because the modification of the natashamjaques's ray package. I have tried to fix some these errors by modify or add some codes between original ray package and natashamjaques's ray package,but there are so many errors!!! So I'd like to ask for help and get the key reason and better solution! or can you tell me some information about your environment settings and ray version? thank you very much!