Closed windar427 closed 4 years ago
You should compile the source code (main.cpp) with CMakeLists.txt. I am using Pybind11 to communicate between C++ and Python.
from env import Env as CEnv
can't find env.py
请问解决了吗?
我的一直是这个问题。。。
from env import Env as CEnv ImportError: generic_type: type "Env" is already registered!
Go to doudizhu/doudizhu-C/CMakeLists.txt change
pybind11_add_module(env main.cpp card.hpp card.cpp game.cpp game.hpp dancing_link.cpp) if(MSVC
to pybind11_add_module(main.cpp card.hpp card.cpp game.cpp game.hpp dancing_link.cpp) if(MSVC
pip install env
from urllib.parse import urlparse
instead of from urlparse import parse_qsl, urlparse and it works
can't find env.py