原文: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. 使用AtomicInteger原子类代替i++线程安全操作

    Java中自增自减操作不具原子性,在多线程环境下是线程不安全的,可以使用使用AtomicInteger原子类代替i++,i--操作完成多线程线程安全操作. 下面是等于i++多线程的自增操作代码: pu ...

  2. Ubuntu 16.04安装FTP客户端filezilla

    1.安装: sudo apt-get install filezilla 参考: http://os.51cto.com/art/201103/247564.htm

  3. Oops, 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine error

    环境: Win7 64位 + VS2005 + Office2013 64位 现象:程序为一个Excel导入程序,导入时报「'Microsoft.ACE.OLEDB.12.0' provider is ...

  4. postgresql 创建函数

    One of the most powerful features of PostgreSQL is its support for user-defined functions written in ...

  5. 【Linux命令】--(1)文件文件夹操作命令15条

    文件文件夹操作命令++++++++++++++++++++++++++++++++++++++++ 列出进入显示文件夹     ls cd pwd  创建移动删除文件     mkdir rm rmd ...

  6. inline-block元素因基线对齐而造成上浮的问题

    假设我需要实现将三个块级元素并排对齐的如下效果: 代码如下: <!DOCTYPE html> <html lang="en-US"> <head> ...

  7. hdu5396 Expression 区间dp +排列组合

    #include<stdio.h> #include<string> #include<map> #include<vector> #include&l ...

  8. 分布式软件体系结构风格(C/S,B/S)

    分布式软件体系结构风格 1.  三层C/S结构 2.  三层B/S结构 了解很多其它软件体系结构 三层C/S结构(3-Tier C/S Architecture) §第1层:用户界面GUI-表示层-- ...

  9. 自己制作Android包括@hide接口的SDK

    Android系统存在一些系统级应用与framework代码耦合较深,编译的时候依赖非常多类里面的@hide接口.这类应用怎么来编译呢?首先我们须要制作一份包括Hide接口的SDK,方法例如以下(以a ...

  10. 桌面系统集成WEB认证系统方案

    最近做的一个项目,有WEB版.WPF版.手机版.领导想集成集团的一个现成的认证系统,姑且称这个认证系统名为 W4认证系统. W4认证系统有如下特点: 1.现成的 2.是个单点登录系统 3.不支持oAu ...