原文:python采坑之路

Setup script exited with error: command 'gcc' failed with exit status 1

伴随出现“cuda.h” cannot be find

由于没有正确安装Python开发环境导致。

Debin/Ubuntu

  • Python2
    sudo apt-get install python-dev
  • Python3
    sudo apt-get install python3-dev

    可能需要libevent库
    sudo apt-get install libevent-dev

    最后更新下开发环境
    sudo apt-get groupinstall 'development tools'

    Centos/Fedora

    sudo yum install python-devel
    sudo yum install libevent-devel
    easy_install gevent

    或者
    pip install gevent

    把环境更新下
    sudo yum install groupinstall 'development tools'

注意事项:

sudo apt-get groupinstall 'development tools'

不能使用

出错的地方在于没有添加cuda path,因此添加CUDApath

sudo get edit ~./bashrc

添加

export PATH=/usr/local/cuda/bin:$PATH

export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH

export CUDA_ROOT=/usr/local/cuda

此后Pycuda安装成功。

pycuda installation error: command 'gcc' failed with exit status 1的更多相关文章

  1. pip error: command 'gcc' failed with exit status 1

    SWIG/_m2crypto_wrap.c:127:20: 致命错误:Python.h:没有那个文件或目录     #include <Python.h>                  ...

  2. Centos4.3安装MySQL-python-1.2.3,出现error: command 'gcc' failed with exit status 1

    在Linux Centos 4.3上安装MySQL-python-1.2.3的时候出现error: command 'gcc' failed with exit status 1, 具体原因是因为没有 ...

  3. mysql_config not found和error: command 'gcc' failed with exit status 1

    要想使python可以操作mysql 就需要MySQL-python驱动,它是python 操作mysql必不可少的模块. 下载地址:https://pypi.python.org/pypi/MySQ ...

  4. error: command 'gcc' failed with exit status 1

    MacOS下想安装MySQL-Python,执行语句: sudo pip install MySQL-Python 遇到了如下错误信息: /Users/kaitlyn/anaconda3/envs/e ...

  5. 【centos】 error: command 'gcc' failed with exit status 1

    原文连接http://blog.csdn.net/fenglifeng1987/article/details/38057193 用安装Python模块出现error: command 'gcc' f ...

  6. centos7 安装mysql--python模块出现EnvironmentError: mysql_config not found和error: command 'gcc' failed with exit status 1

    要想使python可以操作mysql 就需要MySQL-python驱动,它是python 操作mysql必不可少的模块. 下载地址:https://pypi.python.org/pypi/MySQ ...

  7. python安装模块的时候报错error: command 'gcc' failed with exit status 1

    [情况] 在写Python代码的时候,需要用到psutil模块,需要安装. 但是在安装时,报错:error: command 'gcc' failed with exit status 1 [解决步骤 ...

  8. pip安装模块时:error: command 'gcc' failed with exit status 1

    用安装python模块出现error: command 'gcc' failed with exit status 1 问题: gcc编译缺少模块 解决方法: yum install gcc libf ...

  9. python psutil 编译中断。 error: command 'gcc' failed with exit status 1

    error info [root@chenbj psutil-2.0.0]# python setup.py install running install running bdist_egg run ...

随机推荐

  1. BZOJ(4) 1050: [HAOI2006]旅行comf

    1050: [HAOI2006]旅行comf Time Limit: 10 Sec  Memory Limit: 162 MBSubmit: 3984  Solved: 2236[Submit][St ...

  2. - > 贪心基础入门讲解四——独木舟问题

    n个人,已知每个人体重,独木舟承重固定,每只独木舟最多坐两个人,可以坐一个人或者两个人.显然要求总重量不超过独木舟承重,假设每个人体重也不超过独木舟承重,问最少需要几只独木舟? 分析: 一个显然的策略 ...

  3. git SSL certificate problem: unable to get local issuer certificate

    cmd 命令行中输入  git config --global http.sslVerify false 之后再进行操作

  4. XAPIAN简单介绍(三)

    今天主要介绍的是Xapian::Database这个类.先上图 看上去就非常恐怖的吧,我们一点点的说. 首先一切的開始都来自那个include目录中的database.h,他的直接实现是在omdata ...

  5. golang 的GOPATH设置的问题

    go run footer.go 的时候呢, go会依次去GOPATH 和GOROOT设置的对应路径下面找对应的包(目录和文件) 找的时候呢, 会在GoPATH 和GOROOT对应的目录后面再加一层路 ...

  6. 1. 少了一个PermMissingElem Find the missing element in a given permutation.

    少了一个: package com.code; import java.util.Arrays; public class Test03_2 { public static int solution( ...

  7. poj 1331 Multiply

    Multiply Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 5179   Accepted: 2773 Descript ...

  8. Linux后台执行

    在Linux中有时你须要将脚本(test.sh)和可运行程序(exe)后台运行,请使用例如以下方式: nohup ./test.sh & nohup ./exe & 这样执行的程序能够 ...

  9. 网络请求之GET、POST请求

    网络请求-GET请求: 1,NSURL: 请求地址. 2,NSURLRequest :一个NSURLRequest对象就代表一个请求.它包括的信息有: 1)一个NSURL对象 GET请求,不须要写请求 ...

  10. 解决MyEclipse中导入项目@Override错误

    做项目的时候,同事那边电脑上编译通过的java代码,或者是网上下载的例子代码,导入project后却是编译不通过,总是@override报错,把@override去掉就好了,有时候@Override出 ...