You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have managed to get this to build successfully on windows after some changes for MSVC, but I am not able to import into python. I followed the windows build guide and added the 2 paths to my PYTHONPATH:
However, I now have 2 issues when trying to import into python script.
The first is when I try to import pyspiel through python
import pyspiel
I get this error: ImportError: DLL load failed while importing pyspiel: The specified module could not be found.
I do see where pyspiel.pyd is present inside build\x64-Debug\python, and when I remove from PYTHONPATH it no longer is able to find the module at all.
The second python issue is when I try to run open_spiel\python\examples\example.py I get a different error relating to attempting to import from open_spiel.python
Traceback (most recent call last): File "d:\OpenSpiel\open_spiel\open_spiel\python\examples\example.py", line 24, in <module> from open_spiel.python import games # pylint: disable=unused-import ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ModuleNotFoundError: No module named 'open_spiel'
Any insight would be appreciated
The text was updated successfully, but these errors were encountered:
Based on your paths above that would be D:\OpenSpiel\open_spiel\open_spiel.
For the first problem, I don't know how to solve it. If the DLL is being built and it's in the PYTHONPATH then Python should be able to load it. Possibly Python is not setup to look into the PYTHONPATH, but that worked for me last time I tried it.
You are correct, adding top-level did resolve the open_spiel.python import. The pyspiel import issue looks to be due to conda, the dll loads fine when run outside of a conda environment so I will see if I can get that sorted
I have managed to get this to build successfully on windows after some changes for MSVC, but I am not able to import into python. I followed the windows build guide and added the 2 paths to my PYTHONPATH:
-D:\OpenSpiel\open_spiel\open_spiel\out\build\x64-Debug
-D:\OpenSpiel\open_spiel\open_spiel\out\build\x64-Debug\python
However, I now have 2 issues when trying to import into python script.
The first is when I try to import pyspiel through python
import pyspiel
I get this error:
ImportError: DLL load failed while importing pyspiel: The specified module could not be found.
I do see where pyspiel.pyd is present inside
build\x64-Debug\python
, and when I remove from PYTHONPATH it no longer is able to find the module at all.The second python issue is when I try to run
open_spiel\python\examples\example.py
I get a different error relating to attempting to import fromopen_spiel.python
Traceback (most recent call last): File "d:\OpenSpiel\open_spiel\open_spiel\python\examples\example.py", line 24, in <module> from open_spiel.python import games # pylint: disable=unused-import ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ModuleNotFoundError: No module named 'open_spiel'
Any insight would be appreciated
The text was updated successfully, but these errors were encountered: