赞
踩
在使用cuda、torch、python编译一些库时可能出现以下问题:
#include <Python.h> compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
本质上是缺少安装的环境,故执行以下操作:
apt-get install python-dev python3-dev build-essential libssl-dev libffi-dev libxml2-dev libxslt1-dev zlib1g-dev
安装之后,发现再次运行编译的项目(比如:python setup.py install),不再报错。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。