在調試一個開源深度學習的項目,該使用了 theano 。 運行程序出現如下錯誤。
環境: centos7.5 python3.6
錯誤1
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
解決方法:
找到 python3 的源碼,重新編譯安裝
./configure --enable-shared CFLAGS=-fPIC
make
sudo make install
錯誤2
python3: error while loading shared libraries: libpython3.6m.so.1.0: cannot open shared object file: No such file or directory
python運行時沒有加載到libpython3.6m.so.1.0 這個庫文件
解決方法:
ln -s /usr/local/lib/libpython3.6m.so.1.0 /usr/lib64/
~ 更多原因可以深入查詢
參考資料
Ubuntu16使用theano出錯問題
https://www.2cto.com/net/201803/728841.html