error1
Exception: Compilation failed (return status=1): /root/.theano/compiledir_Linux-4.4--generic-x86_64-with-Ubuntu-16.04-xenial-x86_64-2.7.12-64/lazylinker_ext/mod.cpp:1:20: fatal error: Python.h: No such file or directory. compilation terminated..
在新服务器上面部署项目,之前同样的操作一直是没有问题的,但是这次报错没遇到过,网上查了一会并没有找到相同的错误,错误日志说是找不到python 文件,就试了下 apt-get install python2.7-dev,结果错误就没有再出现了
env config
注意cuda版本
export LIBRARY_PATH=$LIBRARY_PATH:/data/zhangyl/theano_1_0_env/lib
# 好像就这个就行了, 其他的不声明也可以运行
export THEANO_FLAGS=device=cuda,floatX=float32,optimizer_including=cudnn,gpuarray.preallocate=0.90
export CPATH=$CPATH:/data/zhangyl/theano_1_0_env/include
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/zhangyl/theano_1_0_env/lib:/usr/local/cuda-10.0/lib64
/home/ubuntu/install/TensorRT-5.0.2.6/lib:/usr/local/cuda-9.0/lib64:/data/theano_1_0_env/lib
export PATH=$PATH:/usr/local/cuda-10.0/bin
/data/theano_1_0_env/bin:/usr/local/cuda-9.0/bin:/home/ubuntu/miniconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin