Skip to content

Problem with latest opencv-python (4.8.1.78) #3

Description

@jt70

It seems that the opencv-pycharm 4.8.1.78 have some issues. I changed setup.py to use opencv-python==4.7.0.72 and it fixed the problem.

Traceback (most recent call last):
File "/home/jason/github_projects/ProtoRL/protorl/examples/dqn.py", line 5, in
from protorl.wrappers.common import make_env
File "/home/jason/github_projects/ProtoRL/protorl/wrappers/common.py", line 1, in
import gym
File "/home/jason/github_projects/ProtoRL/venv/lib/python3.10/site-packages/gym/init.py", line 15, in
from gym.envs import make, spec, register
File "/home/jason/github_projects/ProtoRL/venv/lib/python3.10/site-packages/gym/envs/init.py", line 1, in
from gym.envs.registration import load_env_plugins as _load_env_plugins
File "/home/jason/github_projects/ProtoRL/venv/lib/python3.10/site-packages/gym/envs/registration.py", line 24, in
from gym.wrappers import (
File "/home/jason/github_projects/ProtoRL/venv/lib/python3.10/site-packages/gym/wrappers/init.py", line 3, in
from gym.wrappers.atari_preprocessing import AtariPreprocessing
File "/home/jason/github_projects/ProtoRL/venv/lib/python3.10/site-packages/gym/wrappers/atari_preprocessing.py", line 8, in
import cv2
File "/home/jason/github_projects/ProtoRL/venv/lib/python3.10/site-packages/cv2/init.py", line 181, in
bootstrap()
File "/home/jason/github_projects/ProtoRL/venv/lib/python3.10/site-packages/cv2/init.py", line 175, in bootstrap
if __load_extra_py_code_for_module("cv2", submodule, DEBUG):
File "/home/jason/github_projects/ProtoRL/venv/lib/python3.10/site-packages/cv2/init.py", line 28, in __load_extra_py_code_for_module
py_module = importlib.import_module(module_name)
File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/home/jason/github_projects/ProtoRL/venv/lib/python3.10/site-packages/cv2/typing/init.py", line 69, in
NumPyArrayGeneric = numpy.ndarray[typing.Any, numpy.dtype[numpy.generic]]
TypeError: 'numpy._DTypeMeta' object is not subscriptable

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions