akanazawa / hmr

Project page for End-to-end Recovery of Human Shape and Pose
Other
1.54k stars 395 forks source link

ImportError: No module named _constants #166

Open Dharani95-astro opened 11 months ago

Dharani95-astro commented 11 months ago

from contexts.ctx_mesa import OsContext File "contexts/ctx_base.pyx", line 18, in init contexts.ctx_mesa ImportError: No module named _constants

I am using python2.7 for being compatible with opendr installation. Installation was successful. But when I execute the command python demo.py --img_path data/coco1.png from the readme file. I encounter the above error. The same issue is encountered even with python 3.11

I have attached an image to show the folder structure inside my virtual environment that has _constants.py inside contexts

image

Ths image shows the error in renderer.py in opendr

image

The following shows my virtualenv pip list

Package Version


absl-py 0.15.0 astor 0.8.1 backports.functools-lru-cache 1.6.6 backports.shutil-get-terminal-size 1.0.0 backports.weakref 1.0.post1 cachetools 3.1.1 certifi 2021.10.8 chardet 4.0.0 chumpy 0.70 cloudpickle 1.3.0 cycler 0.10.0 Cython 3.0.0 decorator 4.4.2 deepdish 0.3.7 enum34 1.1.10 funcsigs 1.0.2 functools32 3.2.3.post2 futures 3.4.0 gast 0.2.2 google-auth 1.35.0 google-auth-oauthlib 0.4.1 google-pasta 0.2.0 grpcio 1.41.1 h5py 2.10.0 idna 2.10 ipdb 0.13.13 ipython 5.10.0 ipython-genutils 0.2.0 Keras-Applications 1.0.8 Keras-Preprocessing 1.1.2 kiwisolver 1.1.0 Markdown 3.1.1 matplotlib 2.2.5 mock 3.0.5 networkx 2.2 numexpr 2.7.1 numpy 1.16.6 oauthlib 3.1.0 opencv-python 4.2.0.32 opendr 0.77 opt-einsum 2.3.2 pathlib 1.0.1 pathlib2 2.3.7.post1 pexpect 4.8.0 pickleshare 0.7.5 Pillow 6.2.2 pip 20.3.4 prompt-toolkit 1.0.18 protobuf 3.17.3 ptyprocess 0.7.0 pyasn1 0.5.0 pyasn1-modules 0.3.0 Pygments 2.5.2 pyparsing 2.4.7 python-dateutil 2.8.2 pytz 2023.3 PyWavelets 1.0.3 requests 2.27.1 requests-oauthlib 1.3.1 rsa 4.5 scandir 1.10.0 scikit-image 0.14.5 scipy 1.2.2 setuptools 44.1.1 simplegeneric 0.8.1 six 1.16.0 subprocess32 3.5.4 tables 3.5.2 tensorboard 2.1.0 tensorflow 2.1.0 tensorflow-estimator 2.1.0 termcolor 1.1.0 toml 0.10.2 traitlets 4.3.3 typing 3.10.0.0 urllib3 1.26.16 wcwidth 0.2.6 Werkzeug 1.0.1 wheel 0.37.1 wrapt 1.15.0

Could you please help me?

DanLuoNEU commented 8 months ago

Hi,

Here is the solution. It works for me.