Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: partially initialized module 'gym' has no attribute 'Wrapper' (most likely due to a circular import) #3300

Open
Lzfsir opened this issue Nov 17, 2024 · 3 comments

Comments

@Lzfsir
Copy link

Lzfsir commented Nov 17, 2024

Hello, please allow me to ask where is my problem here?
D:\Anaconda\envs\rlgym\python.exe E:\gym-master\test.py
Traceback (most recent call last):
File "E:\gym-master\test.py", line 1, in
import gym
File "E:\gym-master\gym_init_.py", line 3, in
from gym.wrappers.atari_preprocessing import AtariPreprocessing
File "E:\gym-master\gym\wrappers_init_.py", line 3, in
from gym.wrappers.atari_preprocessing import AtariPreprocessing
File "E:\gym-master\gym\wrappers\atari_preprocessing.py", line 13, in
class AtariPreprocessing(gym.Wrapper):
AttributeError: partially initialized module 'gym' has no attribute 'Wrapper' (most likely due to a circular import)

Process finished with exit code 1

@pseudo-rnd-thoughts
Copy link
Contributor

What version of gym are you using? Could you provide an example script?

@Lzfsir
Copy link
Author

Lzfsir commented Nov 18, 2024

This is the version I downloaded。
absl-py 2.1.0 pypi_0 pypi
ale-py 0.8.1 pypi_0 pypi
atari-py 1.2.2 pypi_0 pypi
atomicwrites 1.4.1 pypi_0 pypi
attrs 24.2.0 pypi_0 pypi
box2d-py 2.3.5 pypi_0 pypi
ca-certificates 2024.9.24 haa95532_0
cffi 1.17.1 pypi_0 pypi
cloudpickle 3.1.0 pypi_0 pypi
colorama 0.4.6 pypi_0 pypi
contourpy 1.3.0 pypi_0 pypi
cycler 0.12.1 pypi_0 pypi
cython 3.0.11 pypi_0 pypi
fasteners 0.19 pypi_0 pypi
fonttools 4.55.0 pypi_0 pypi
glfw 2.7.0 pypi_0 pypi
gym 0.26.2 pypi_0 pypi
gym-notices 0.0.8 pypi_0 pypi
imageio 2.36.0 pypi_0 pypi
importlib-metadata 8.5.0 pypi_0 pypi
importlib-resources 6.4.5 pypi_0 pypi
iniconfig 2.0.0 pypi_0 pypi
kiwisolver 1.4.7 pypi_0 pypi
lz4 4.3.3 pypi_0 pypi
matplotlib 3.9.2 pypi_0 pypi
mujoco 2.2.0 pypi_0 pypi
mujoco-py 2.1.2.14 pypi_0 pypi
numpy 2.0.2 pypi_0 pypi
opencv-python 4.10.0.84 pypi_0 pypi
openssl 3.0.15 h827c3e9_0
packaging 24.2 pypi_0 pypi
pillow 11.0.0 pypi_0 pypi
pip 24.2 py39haa95532_0
pluggy 1.5.0 pypi_0 pypi
py 1.11.0 pypi_0 pypi
pycparser 2.22 pypi_0 pypi
pygame 2.1.0 pypi_0 pypi
pyopengl 3.1.7 pypi_0 pypi
pyparsing 3.2.0 pypi_0 pypi
pytest 7.0.1 pypi_0 pypi
python 3.9.20 h8205438_1
python-dateutil 2.9.0.post0 pypi_0 pypi
setuptools 75.1.0 py39haa95532_0
six 1.16.0 pypi_0 pypi
sqlite 3.45.3 h2bbff1b_0
swig 4.0.2 hd77b12b_4
tomli 2.1.0 pypi_0 pypi
typing-extensions 4.12.2 pypi_0 pypi
tzdata 2024b h04d1e81_0
vc 14.40 h2eaa2aa_1
vs2015_runtime 14.40.33807 h98bb1dd_1
wheel 0.44.0 py39haa95532_0
zipp 3.21.0 pypi_0 pypi

@pseudo-rnd-thoughts
Copy link
Contributor

Could you provide an example script to test with

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants