dopamine icon indicating copy to clipboard operation
dopamine copied to clipboard

ImportError: No module named atari_py

Open phoenixjyb opened this issue 7 years ago • 10 comments

Hi there,

When I try to run "python tests/atari_init_test.py", the following error message appears: ImportError: No module named atari_py

However, atari_py was installed using pip install atari-py, and when try again installing atari-py, it indicates: requirement already satisfied: atari_py in /usr/local/lib/python2.7/dist-packages

System environment information are: Ubuntu 16.04; Python: 2.7/15 | Anaconda, Inc. | default, May 1 2018

Any way to help locate atari_py?

Cheers,

phoenixjyb avatar Sep 16 '18 05:09 phoenixjyb

are you running all of this inside a virtualenv?

psc-g avatar Sep 17 '18 09:09 psc-g

I was facing the same issue and later I merged openai/atari-py repo into it and everything worked fine for me.

iteachmachines avatar Sep 27 '18 10:09 iteachmachines

Try pip install atari_py

Jarvis-K avatar Oct 01 '18 04:10 Jarvis-K

same problem 😕

stephane-archer avatar Feb 27 '19 08:02 stephane-archer

sudo pip install absl-py atari-py gin-config gym opencv-python tensorflow-gpu

zook111 avatar Mar 28 '19 04:03 zook111

Try to install it using conda environment. https://anaconda.org/akode/atari-py

iteachmachines avatar Mar 28 '19 04:03 iteachmachines

I have tried all mentioned comments above, None works!

saraNgolestani avatar Aug 26 '19 07:08 saraNgolestani

atari-py 0.2.6 is no good. try install latest version(0.3.0): git clone https://github.com/openai/atari-py cd atari-py pip install -e .

sailfish009 avatar Mar 04 '20 06:03 sailfish009

I have this problem inside a virtual environment. pip install gym[atari] succeeded:

Successfully installed atari-py-0.2.6 opencv-python-4.3.0.36

But when I try to import it, I get

import atari_py
Traceback (most recent call last):
  File "/home/rylan/Documents/acme/acme-venv/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 3343, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-2-3e323834000c>", line 1, in <module>
    import atari_py
  File "/snap/pycharm-professional/201/plugins/python/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
ModuleNotFoundError: No module named 'atari_py'

RylanSchaeffer avatar Jul 06 '20 02:07 RylanSchaeffer

Within a virtual environment, the only way this worked for me was to clone the atari-py project from the repo, install it locally then use sys.path.append('path to atari-py repo') in my Jupyter notebook or Python source file for this to finally work.

git clone https://github.com/openai/atari-py
cd atari-py
pip install -e .

Then in the notebook or source file:

import sys
sys.path.append('path to atari-py repo')

rayryeng avatar Jul 19 '20 17:07 rayryeng