tencent-ailab / hok_env

Honor of Kings AI Open Environment of Tencent
https://aiarena.tencent.com/aiarena/en/open-gamecore
Apache License 2.0
590 stars 68 forks source link

ModuleNotFoundError: No module named 'hok.hok1v1.lib.interface' #40

Closed xiyuewu closed 6 months ago

xiyuewu commented 10 months ago

Thanks for your advice, I have solved this problem by completing hok module path

Un error message showed as


Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "e:\downloads\hok_env-master\hok_env-master\hok_env\hok\hok1v1\__init__.py", line 11, in <module>
    from hok.hok1v1.env1v1 import HoK1v1
  File "e:\downloads\hok_env-master\hok_env-master\hok_env\hok\hok1v1\env1v1.py", line 18, in <module>
    import hok.hok1v1.lib.interface as interface
ModuleNotFoundError: No module named 'hok.hok1v1.lib.interface'

It appeared when I tried python3 test_env.py in the directory hok_env\hok\hok1v1\unit_test
my Python version is Python3.7
hongyangqin commented 10 months ago

Have you installed the hok_env in your Python site-packages? Are you able to find hok_env/hok/hok1v1/lib/interface.cpython-37m-x86_64-linux-gnu.so? (Using the pre-built image is strongly recommended)

xiyuewu commented 10 months ago

Sure, I have runned pip install -e . successfully, and there are four .so files in hok_env/hok/hok1v1/lib/, interface.cpython-37m-x86_64-linux-gnu.so exsits When I try only import hok module in shell , it runs well

hongyangqin commented 10 months ago

It seems that you are running the hok_env on windows. WSL2 are required becase of the interface.so

huahai2022 commented 10 months ago

Sure, I have runned pip install -e . successfully, and there are four .so files in hok_env/hok/hok1v1/lib/, interface.cpython-37m-x86_64-linux-gnu.so exsits When I try only import hok module in shell , it runs well

Can you explain in detail?thanks