原文: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. 微信最新开源的PhxSQL

    在编者看到“[重磅]微信开源PhxSQL:高可用.强一致的MySQL集群”时,由衷赞叹,这等造福广大DBA及运维同仁的事情,真心赞.腾讯及微信的开放,真的不是说说而已. 本文由资深DB从业者撰写,相信 ...

  2. Android: 帮助找出内存泄漏的工具

    1. Intellij Idea的Memory Monitor 通过Memory Monitor,我们可以知道哪个页面哪些操作会占用比较多的内存.如果需要更详细的信息,可以导出heap,通过MAT来分 ...

  3. pg_dump: [archiver (db)] connection to database “dbase” failed: FATAL: Peer authentication failed for user “postgres”

    "Peer authentication" means that it's comparing your database username against your Linux ...

  4. What are Unix swap (.swp) files?

    原文: http://www.networkworld.com/article/2931534/it-management/what-are-unix-swap-swp-files.html ---- ...

  5. js 实现对ajax请求面向对象的封装

             AJAX 是一种用于创建高速动态网页的技术.通过在后台与server进行少量数据交换.AJAX 能够使网页实现异步更新.这意味着能够在不又一次载入整个网页的情况下,对网页的某部分进行 ...

  6. LeetCode 451. Sort Characters By Frequency (根据字符出现频率排序)

    Given a string, sort it in decreasing order based on the frequency of characters. Example 1: Input: ...

  7. 假期(MySQL相关)

    """ 一.初始数据库: - 数据库管理软件的由来 四个字:存储数据(简单暴力) - 数据库概述 :什么是数据:简单的说就是描述事物的记录称为数据:可以是数字,文字,图片 ...

  8. PhoneGap:JS跨域请求

    PhoneGap开发,理论上好处多多.但因为javascript是其中的主角,并且是直接存放于手机,跟服务器数据交互,就会有一个跨域访问的问题. 当然,这个问题肯定有解决方案,不然的话,这种利用Pho ...

  9. HDU 5489 Difference of Clustering 图论

    Difference of Clustering Problem Description Given two clustering algorithms, the old and the new, y ...

  10. git实验室

    git clone一个项目 jiqing@jiqing-System-Product-Name:/home/wwwroot/default$ sudo git clone http://106.14. ...