以下のようなエラーが出ました。
原因がわからないのですが、どのようにしたら解決するでしょうか。
よろしくお願い致します。
Python 3.6.4 (default, Jul 9 2019, 13:06:04)
[GCC 7.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
import keras
Using Theano backend.
You can find the C code in this temporary file: /tmp/theano_compilation_error_0rx2eexr
Traceback (most recent call last):
File "/home/iota/.pyenv/versions/3.6.4/lib/python3.6/site-packages/theano/gof/lazylinker_c.py", line 81, in <module>
actual_version, force_compile, _need_reload))
ImportError: Version check of the existing lazylinker compiled file. Looking for version 0.211, but found None. Extra debug information: force_compile=False, _need_reload=True
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/iota/.pyenv/versions/3.6.4/lib/python3.6/site-packages/theano/gof/lazylinker_c.py", line 105, in <module>
actual_version, force_compile, _need_reload))
ImportError: Version check of the existing lazylinker compiled file. Looking for version 0.211, but found None. Extra debug information: force_compile=False, _need_reload=True
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/iota/.pyenv/versions/3.6.4/lib/python3.6/site-packages/keras/__init__.py", line 2, in <module>
from . import backend
File "/home/iota/.pyenv/versions/3.6.4/lib/python3.6/site-packages/keras/backend/__init__.py", line 61, in <module>
from .theano_backend import *
File "/home/iota/.pyenv/versions/3.6.4/lib/python3.6/site-packages/keras/backend/theano_backend.py", line 1, in <module>
import theano
File "/home/iota/.pyenv/versions/3.6.4/lib/python3.6/site-packages/theano/__init__.py", line 110, in <module>
from theano.compile import (
File "/home/iota/.pyenv/versions/3.6.4/lib/python3.6/site-packages/theano/compile/__init__.py", line 12, in <module>
from theano.compile.mode import *
File "/home/iota/.pyenv/versions/3.6.4/lib/python3.6/site-packages/theano/compile/mode.py", line 11, in <module>
import theano.gof.vm
File "/home/iota/.pyenv/versions/3.6.4/lib/python3.6/site-packages/theano/gof/vm.py", line 674, in <module>
from . import lazylinker_c
File "/home/iota/.pyenv/versions/3.6.4/lib/python3.6/site-packages/theano/gof/lazylinker_c.py", line 140, in <module>
preargs=args)
File "/home/iota/.pyenv/versions/3.6.4/lib/python3.6/site-packages/theano/gof/cmodule.py", line 2396, in compile_str
(status, compile_stderr.replace('\n', '. ')))
Exception: Compilation failed (return status=1): /usr/bin/ld: /home/iota/.pyenv/versions/3.6.4/lib/libpython3.6m.a(ceval.o): relocation R_X86_64_PC32 against symbol `_Py_NoneStruct' can not be used when making a shared object。 -fPIC を付けて再コンパイルしてください。. /usr/bin/ld: 最終リンクに失敗しました: 不正な値です. collect2: error: ld returned 1 exit status.