我正在尝试在pymc3中运行一个模型,该模型在多级模型中执行点积时利用theano.dot
。但是,当我尝试导入theano时,我得到:
python model.py
... // there's a huge output that's looks to be a file
Problem occurred during compilation with the command line below:
g++ -shared -g -O3 -fno-math-errno -Wno-unused-label -Wno-unused-variable -Wno-write-strings -Wl,-rpath,/home/thauck/miniconda/envs/data/lib -D NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -m64 -fPIC -I/home/thauck/miniconda/envs/data/lib/python2.7/site-packages/numpy/core/include -I/home/thauck/miniconda/envs/data/include/python2.7 -o /home/thauck/.theano/compiledir_Linux-3.14-0.bpo.2-amd64-x86_64-with-debian-7.6--2.7.8-64/tmpkxtykS/b4f7a60b7c9f9a250601326a9fe2016e.so /home/thauck/.theano/compiledir_Linux-3.14-0.bpo.2-amd64-x86_64-with-debian-7.6--2.7.8-64/tmpkxtykS/mod.cpp -L/home/thauck/miniconda/envs/data/lib -lpython2.7 -lf77blas -lcblas -latlas
/usr/bin/ld: cannot find -lf77blas
/usr/bin/ld: cannot find -lcblas
/usr/bin/ld: cannot find -latlas
我正在运行backports-debian-7-wheezy-v20140904
。
康达:
目前的conda安装:
platform : linux-64
conda version : 3.6.0
conda-build version : not installed
python version : 2.7.8.final.0
requests version : 2.3.0
root environment : /home/thauck/miniconda (writable)
default environment : /home/thauck/miniconda/envs/data
envs directories : /home/thauck/miniconda/envs
package cache : /home/thauck/miniconda/pkgs
channel URLs : http://repo.continuum.io/pkgs/free/linux-64/
http://repo.continuum.io/pkgs/pro/linux-64/
config file : None
is foreign system : False
# conda environments:
#
data * /home/thauck/miniconda/envs/data
root /home/thauck/miniconda
sys.version: 2.7.8 |Continuum Analytics, Inc.| (defau...
sys.prefix: /home/thauck/miniconda
sys.executable: /home/thauck/miniconda/bin/python
conda location: /home/thauck/miniconda/lib/python2.7/site-packages/conda
conda-build: None
CIO_TEST: <not set>
CONDA_DEFAULT_ENV: data
CONDA_ENVS_PATH: <not set>
LD_LIBRARY_PATH: <not set>
PATH: /home/thauck/miniconda/envs/data/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
PYTHONHOME: <not set>
PYTHONPATH: <not set>
在看了各种问题之后我也试过了:
THEANO_FLAGS=blas.ldflags="-L/usr/lib/ -lblas" python model.py
这段错误。
此外,似乎我在/usr/lib
中有blas目录。
(data)thauck@ds-th:/usr/lib$ ls | grep blas
libblas.a
libblas.so
libblas.so.3
libblas.so.3gf
libopenblas.so.0
openblas-base
编辑:
造成这种情况的原因也会打破pymc3中的MvNormal
。
答案 0 :(得分:0)
我想你有一个旧版本的Theano,现在如果我们找不到或检测到如何再次链接blas,我们有一个不会导致崩溃的后备,但只会引起警告。
将Theano更新为开发版本。
如果您是通过conda安装的,请先将其删除,然后更新:
pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git
或
pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git --user
有关如何更新到开发版本的更多信息:
http://deeplearning.net/software/theano/install.html#bleeding-edge-install-instructions