于在Python3.6.7 +Ubuntu16.04下安装channels报错

报错类型:  error: command ‘x86_64-linux-gnu-gcc‘ failed with exit status 1
...................................

warning: no previously-included files matching ‘*.misc‘ found under directory ‘src/twisted‘
    warning: no previously-included files matching ‘*.bugfix‘ found under directory ‘src/twisted‘
    warning: no previously-included files matching ‘*.doc‘ found under directory ‘src/twisted‘
    warning: no previously-included files matching ‘*.feature‘ found under directory ‘src/twisted‘
    warning: no previously-included files matching ‘*.removal‘ found under directory ‘src/twisted‘
    warning: no previously-included files matching ‘NEWS‘ found under directory ‘src/twisted‘
    warning: no previously-included files matching ‘README‘ found under directory ‘src/twisted‘
    warning: no previously-included files matching ‘newsfragments‘ found under directory ‘src/twisted‘
    warning: no previously-included files found matching ‘src/twisted/topfiles/CREDITS‘
    warning: no previously-included files found matching ‘src/twisted/topfiles/ChangeLog.Old‘
    warning: no previously-included files found matching ‘pyproject.toml‘
    warning: no previously-included files found matching ‘codecov.yml‘
    warning: no previously-included files found matching ‘appveyor.yml‘
    warning: no previously-included files found matching ‘.circleci‘
    warning: no previously-included files matching ‘*‘ found under directory ‘.circleci‘
    no previously-included directories found matching ‘bin‘
    no previously-included directories found matching ‘admin‘
    no previously-included directories found matching ‘.travis‘
    no previously-included directories found matching ‘.github‘
    warning: no previously-included files found matching ‘docs/historic/2003‘
    warning: no previously-included files matching ‘*‘ found under directory ‘docs/historic/2003‘
    writing manifest file ‘src/Twisted.egg-info/SOURCES.txt‘
    copying src/twisted/python/twisted-completion.zsh -> build/lib.linux-x86_64-3.6/twisted/python
    creating build/lib.linux-x86_64-3.6/twisted/python/_pydoctortemplates
    copying src/twisted/python/_pydoctortemplates/common.html -> build/lib.linux-x86_64-3.6/twisted/python/_pydoctortemplates
    copying src/twisted/python/_pydoctortemplates/index.html -> build/lib.linux-x86_64-3.6/twisted/python/_pydoctortemplates
    copying src/twisted/python/_pydoctortemplates/summary.html -> build/lib.linux-x86_64-3.6/twisted/python/_pydoctortemplates
    copying src/twisted/test/cert.pem.no_trailing_newline -> build/lib.linux-x86_64-3.6/twisted/test
    copying src/twisted/test/key.pem.no_trailing_newline -> build/lib.linux-x86_64-3.6/twisted/test
    copying src/twisted/test/server.pem -> build/lib.linux-x86_64-3.6/twisted/test
    copying src/twisted/mail/test/rfc822.message -> build/lib.linux-x86_64-3.6/twisted/mail/test
    copying src/twisted/python/test/_deprecatetests.py.3only -> build/lib.linux-x86_64-3.6/twisted/python/test
    copying src/twisted/words/im/instancemessenger.glade -> build/lib.linux-x86_64-3.6/twisted/words/im
    copying src/twisted/words/xish/xpathparser.g -> build/lib.linux-x86_64-3.6/twisted/words/xish
    copying src/twisted/internet/iocpreactor/notes.txt -> build/lib.linux-x86_64-3.6/twisted/internet/iocpreactor
    copying src/twisted/internet/test/_awaittests.py.3only -> build/lib.linux-x86_64-3.6/twisted/internet/test
    copying src/twisted/internet/test/_yieldfromtests.py.3only -> build/lib.linux-x86_64-3.6/twisted/internet/test
    creating build/lib.linux-x86_64-3.6/twisted/internet/test/fake_CAs
    copying src/twisted/internet/test/fake_CAs/chain.pem -> build/lib.linux-x86_64-3.6/twisted/internet/test/fake_CAs
    copying src/twisted/internet/test/fake_CAs/not-a-certificate -> build/lib.linux-x86_64-3.6/twisted/internet/test/fake_CAs
    copying src/twisted/internet/test/fake_CAs/thing1.pem -> build/lib.linux-x86_64-3.6/twisted/internet/test/fake_CAs
    copying src/twisted/internet/test/fake_CAs/thing2-duplicate.pem -> build/lib.linux-x86_64-3.6/twisted/internet/test/fake_CAs
    copying src/twisted/internet/test/fake_CAs/thing2.pem -> build/lib.linux-x86_64-3.6/twisted/internet/test/fake_CAs
    running build_ext
    building ‘twisted.test.raiser‘ extension
    creating build/temp.linux-x86_64-3.6
    creating build/temp.linux-x86_64-3.6/src
    creating build/temp.linux-x86_64-3.6/src/twisted
    creating build/temp.linux-x86_64-3.6/src/twisted/test
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c src/twisted/test/raiser.c -o build/temp.linux-x86_64-3.6/src/twisted/test/raiser.o
    src/twisted/test/raiser.c:4:20: fatal error: Python.h: 没有那个文件或目录
    compilation terminated.
    error: command ‘x86_64-linux-gnu-gcc‘ failed with exit status 1
    
    ----------------------------------------
Command "/usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__=‘/tmp/pip-install-e6p918pk/twisted/setup.py‘;f=getattr(tokenize, ‘open‘, open)(__file__);code=f.read().replace(‘\r\n‘, ‘\n‘);f.close();exec(compile(code, __file__, ‘exec‘))" install --record /tmp/pip-record-jo3m5dbj/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-e6p918pk/twisted/

我尝试了博客上的好多方法都失败了,最后总结了两个,尝试了一下成功了

1.#sudo apt-get install python3.6-gdbm

2.#sudo apt-get install python3.6-dev

因为ubuntu16.04自带Python2.7和Python3.5,打开channels官网会有最新版的channels==2.1.7,Python2.7支持channels==1.8,所以在用Python2.7时会有好多包函数无法导入,于是下载了Python3.6,,问题解决。

原文地址:https://www.cnblogs.com/qybk/p/10700770.html

时间: 2024-11-05 16:26:36

于在Python3.6.7 +Ubuntu16.04下安装channels报错的相关文章

Ubuntu16.04下安装redis

Ubuntu16.04下安装redis 保证网络畅通,选定好下载工作路径,执行以下命令下载redis-3.2.6: sudo wget http://download.redis.io/releases/redis-3.2.6.tar.gz  解压该文件: sudo tar -zxvf redis-3.2.6.tar.gz 会在当前目录下生成文件夹redis-3.2.6,我把它移动到了/usr/redis目录下: sudo mv redis-3.2.6 /usr/redis 如果没有安装gcc,

Ubuntu16.04下安装oracle客户端

在Ubuntu16.04下安装oracle数据库客户端,使Django项目连接到Oracle数据库 1.下载oracle客户端安装包: 进入官网http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html下载如下所需的三个包. oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm oracle-instantclient11.2-devel-11.2.0.4.0-1

ubuntu16.04下安装artoolkit5

目前对AR技术的常见理解就是CV(Computer Vision)+CG(Computer Graphic).CV的方法很多,简单些比如FREAK+ICP(ARToolKit中的NFT),复杂些就是SLAM(Magic Leap).CG就没什么好说的,利用CV算法获取到的图形相关信息(比如CG中的模型矩阵.视图矩阵.投影矩阵)进行绘制.从这一点上来说Pokemon GO确实不能算作AR游戏,毕竟人家只是基于LBS的. 从目前来看vision based的AR系统才是主流.但是局限于我个人的见识,

ubuntu16.04下安装petalinux

ubuntu16.04下安装petalinux 参考https://www.cnblogs.com/vacajk/p/6146146.html 安装环境: 1. ubuntu 16.04 2. petalinux-v2015.4 3. 目标板:zynq 7010 SOC 安装步骤: 1. 在home目录下新建两个文件夹:petalinux和petalinux_installer两个文件夹,将安装包petalinux-v2015.4-final-installer-dec.run放到文件夹peta

debian 下安装 openldap 报错 BerkeleyDB not available 解决

debian 下安装 openldap 报错 BerkeleyDB not available 解决: apt-get install libdb-dev

linux下安装php报错configure: error: Cannot find MySQL header files under /usr/include/mysql.

linux下安装php报错configure: error: Cannot find MySQL header files under /usr/include/mysql. 2013-03-04 15:34wdjhz | 分类:服务器软件 | 浏览5318次 configure: error: Cannot find MySQL header files under /usr/include/mysql.Note that the MySQL client library is not bun

Ubuntu16.04下安装texlive

Ubuntu 16.04下安装texlive的步骤如下: 1.下载texlive 打开终端输入:sudo apt-get install texlive-full  #下载这一过程会持续10-20分钟 2.接下来的按照如下网址安装即可:http://linux-wiki.cn/wiki/zh-hans/LaTeX%E4%B8%AD%E6%96%87%E6%8E%92%E7%89%88%EF%BC%88%E4%BD%BF%E7%94%A8XeTeX%EF%BC%89 注意有个语句:sudo cp

Ubuntu16.04下安装python3.6.4详细步骤

记录一下: Ubuntu16.04自带的python版本为python2.7和python3.5,现在想要安装python3.6.4,注意:系统自带的python版本别删除 步骤: # 官网下载安装包 1. wget http://www.python.org/ftp/python/3.6.4/Python-3.6.4.tgz # 解压 2. tar -xvzf Python-3.6.4.tgz # 安装 3. cd Python-3.6.4 4. ./configure --with-ssl

ubuntu16.04下安装NS-2.35以及对simple例的理解

本人是在VMWare上安装的ubuntu16.04版本,然后安装NS2.35. 1.下载ns2的安装包,这里我选择的是ns-allinone-2.35.tar.gz压缩格式的all in one安装包,all in one 安装包包含所有的组件,比较方便,另附下载地址: http://www.isi.edu/nsnam/ns/ns-build.html 2.安装前要先进行一些准备工作进行配置环境,输入如下代码: $sudo apt-get install build-essential $sud