Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

ImportError: dynamic module does not define module export function (PyInit_minirts) #15

Closed
ethanluoyc opened this issue Jul 13, 2017 · 2 comments

Comments

@ethanluoyc
Copy link

Hi,

I was attempting to train with the command line arguments specified in the repo's README,
however I was getting this error.

Traceback (most recent call last):
File "run.py", line 140, in
game = load_module(os.environ["game"]).Loader()
File "/Users/Ethan/dev/github/ELF/rlpytorch/utils.py", line 510, in load_module
module = import(os.path.basename(mod))
File "./rts/game_MC/game.py", line 8, in
import minirts
ImportError: dynamic module does not define module export function (PyInit_minirts)

Any idea why this is happening?

@ppwwyyxx
Copy link
Contributor

You did not compile the python extension and run the game with the same version of Python.

Try re-compiling everything with:

PYTHON_CONFIG=/path/to/python/install/dir/bin/python-config make

and run with the matching python.

@ethanluoyc
Copy link
Author

Indeed,fixed by using the right version of Python. Closing this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants