pytorch / ELF

ELF: a platform for game research with AlphaGoZero/AlphaZero reimplementation
Other
3.37k stars 566 forks source link

ImportError: dynamic module does not define module export function (PyInit__elf) #26

Closed greatken999 closed 6 years ago

greatken999 commented 6 years ago

make test (cd build/elf && GTEST_COLOR=1 ctest --output-on-failure) Test project /mnt/ken-volume/ai/ELF/build/elf Start 1: test_cpp_elf_options_OptionMapTest 1/2 Test #1: test_cpp_elf_options_OptionMapTest .... Passed 0.01 sec Start 2: test_cpp_elf_options_OptionSpecTest 2/2 Test #2: test_cpp_elf_options_OptionSpecTest ... Passed 0.00 sec

100% tests passed, 0 tests failed out of 2

Total Test time (real) = 0.02 sec (cd build/elfgames/go && GTEST_COLOR=1 ctest --output-on-failure) Test project /mnt/ken-volume/ai/ELF/build/elfgames/go Start 1: test_cpp_elfgames_go_base_coord_test 1/6 Test #1: test_cpp_elfgames_go_base_coord_test ........... Passed 0.01 sec Start 2: test_cpp_elfgames_go_base_go_test 2/6 Test #2: test_cpp_elfgames_go_base_go_test .............. Passed 0.00 sec Start 3: test_cpp_elfgames_go_base_board_feature_test 3/6 Test #3: test_cpp_elfgames_go_base_board_feature_test ... Passed 0.00 sec Start 4: test_cpp_elfgames_go_base_symmetry_test 4/6 Test #4: test_cpp_elfgames_go_base_symmetry_test ........ Passed 0.01 sec Start 5: test_cpp_elfgames_go_sgf_sgf_test 5/6 Test #5: test_cpp_elfgames_go_sgf_sgf_test .............. Passed 0.01 sec Start 6: test_cpp_elfgames_go_mcts_mcts_test 6/6 Test #6: test_cpp_elfgames_go_mcts_mcts_test ............ Passed 0.01 sec

100% tests passed, 0 tests failed out of 6

Total Test time (real) = 0.05 sec ken@ken-server1:/XXX/ELF$source scripts/devmode_set_pythonpath.sh ken@ken-server1:/XXX/ELF$ cd scripts/elfgames/go/ ken@ken-server1:/XXX/ELF/scripts/elfgames/go$ ./gtp.sh /mnt/ken-volume/ai/ELF/pretrained-go-19x19-v0.bin --verbose --gpu 0 --num_block 20 --dim 224 --mcts_puct 1.50 --batchsize 16 --mcts_rollout_per_batch 16 --mcts_threads 2 --mcts_rollout_per_thread 8192 --resign_thres 0.05 --mcts_virtual_loss 1 Traceback (most recent call last): File "df_console.py", line 12, in from rlpytorch import Evaluator, load_env File "/mnt/ken-volume/ai/ELF/src_py/rlpytorch/init.py", line 8, in from .model_loader import ModelLoader, load_env File "/mnt/ken-volume/ai/ELF/src_py/rlpytorch/model_loader.py", line 13, in from elf.options import import_options, PyOptionSpec File "/mnt/ken-volume/ai/ELF/src_py/elf/init.py", line 11, in from .context_utils import ContextArgs File "/mnt/ken-volume/ai/ELF/src_py/elf/context_utils.py", line 7, in from elf.options import auto_import_options, PyOptionSpec File "/mnt/ken-volume/ai/ELF/src_py/elf/options/init.py", line 8, in from .py_option_map import PyOptionMap File "/mnt/ken-volume/ai/ELF/src_py/elf/options/py_option_map.py", line 10, in from _elf import _options ImportError: dynamic module does not define module export function (PyInit__elf)

jma127 commented 6 years ago

Hey, thanks for your interest! This is a common problem that people have seen when:

Without more details, it will be hard to assist.

greatken999 commented 6 years ago

thanks jma127! It's look is wong python version when make. I had fix this use sudo rm /usr/bin/python sudo ln -s /usr/bin/python3 /usr/bin/python

manuel-delverme commented 6 years ago

@greatken999 that's not the right way to solve the problem some parts of your system (ubuntu [used to] do that) might rely on a specific the /usr/bin/python version and changing the link could break them. Maybe you could try creating a virtualenv.