unbuntu 16.04 运行 pip install jupyter --upgrade 的时候出现了下面的错误

Failed building wheel for scandir
Running setup.py clean for scandir
Failed to build scandir
Installing collected packages: scandir, pathlib2, simplegeneric, pickleshare, ipython, Send2Trash, backports-abc, futures, singledispatch, tornado, pyzmq, python-dateutil, jupyter-client, terminado, ipykernel, notebook, widgetsnbextension, ipywidgets, qtconsole, jupyter-console, jupyter
Running setup.py install for scandir ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-kNCioY/scandir/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-27iuBb/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying scandir.py -> build/lib.linux-x86_64-2.7
running build_ext
building '_scandir' extension
creating build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c _scandir.c -o build/temp.linux-x86_64-2.7/_scandir.o
_scandir.c:14:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-kNCioY/scandir/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-27iuBb/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-kNCioY/scandir/

然后在github上面找到这个

That's unrelated to IPython, the issue comes from installing scandir, you should see that with the scandir maintainers.

If you are missing Python.h during compilation that's likely because you are missing the Python header. If you are going to compile c-extensions (which you do implicitly by install in scandir) you may want to install the Python headers (apt-get install python-dev maybe ?).

大致意思就是缺少  Python.h  头文件,上面我用蓝色标出了这个错误,运行下面这个指令完美解决我的问题

apt-get install python-dev

Failed building wheel for scandir 解决方案的更多相关文章

  1. 安装scrapy出错Failed building wheel for Twisted

    用64位windows10的CMD命令安装pip install scrapy出错: Running setup.py bdist_wheel for Twisted ... error Failed ...

  2. Python安装scrapy过程中出现“Failed building wheel for xxx”

    https://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml Python安装scrapy库过程中出现“ Failed building wheel for xxx ...

  3. 解决Mac安装tesserocr报错问题 Failed building wheel for

    localhost:~ jerry$ Processing /var/www/git/python/tesserocr -bash: Processing: command not found loc ...

  4. Failed building wheel for netifaces

    目录 文章目录 目录 问题 解决 问题 安装 OpenStackClient 的时候发现问题: Failed building wheel for netifaces Running setup.py ...

  5. Failed building wheel for cytoolz

    2019独角兽企业重金招聘Python工程师标准>>> 当我使用 pip instlal cytoolz 时,  报以下错误: error: Microsoft Visual C++ ...

  6. error: can't copy 'docx\templates\default-docx-template': doesn't exist or not a regular file --------------- Failed building wheel for python-docx; python-docx的安装使用;python操作word

    本人第一安装python-docx很不幸就出现了,如下的错误:(如果你也遇到同样的错误,不要慌可以参考下面解决方案,由于第一次处理这种错误,如有不对欢迎大家多多批评指正) 问题所在是因为我们的setu ...

  7. Failed building wheel for Twisted

    在安装scrapy框架的过程中,pip install scrapy 出现报错信息: building 'twisted.test.raiser' extension error: Microsoft ...

  8. PIP安装Python的scipy,scrapy等包出现“failed building wheel for xxx”问题解决办法

    1.在这里下载对应的.whl文件,注意别改文件名! http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml Ctrl + F,输入lxml,找到下面这段 Lxm ...

  9. Django 项目连接数据库Mysql要安装mysqlclient驱动出错 : Failed building wheel for mysqlclient:

    1,如果直接用 CMD命令:pip install mysqlclient ,会安装出错. 2,解决问题,参考了这个博友的帖子:https://blog.csdn.net/qq_29784441/ar ...

随机推荐

  1. 【一天一道LeetCode】#344. Reverse String

    一天一道LeetCode 本系列文章已全部上传至我的github,地址:ZeeCoder's Github 欢迎大家关注我的新浪微博,我的新浪微博 欢迎转载,转载请注明出处 (一)题目 Write a ...

  2. Android面试之高级篇

    结合自己之前去很多大公司的面试经历和自己面别人的一些题,这里做一些总结,Android面试中常见的面试题. 1,Android的Handler运行机制 要解释Handler的运行机制就要讲几个对象:M ...

  3. 上海C++游戏服务器群活动PPT下载

    下载页面: http://download.csdn.net/download/jq0123/8227519 跨服与跨区的设计PPT 上海C++游戏服务器群 2014.11.9 沙龙讲义. 自我介绍 ...

  4. 怎么避免在类实现的cpp文件中不要多次进行类声明

    方法1: 类的头文件中写 #pragma once class MyTeacher { public: MyTeacher(); ~MyTeacher(); }; 方法2: 类的头文件中写 #ifnd ...

  5. ListView控件使用

    //ListView标头的代码创建方法. ColumnHeader title=new ColumnHeader(); //声明标头,并创建对象. title.Text="标头1名称&quo ...

  6. Hash冲突解决

    hash的冲突不可避免的 1.开放地址法 开放地执法有一个公式:Hi=(H(key)+di) MOD m i=1,2,-,k(k<=m-1) 其中,m为哈希表的表长.di 是产生冲突的时候的增量 ...

  7. 从JDK源码角度看线程池原理

    "池"技术对我们来说是非常熟悉的一个概念,它的引入是为了在某些场景下提高系统某些关键节点性能,最典型的例子就是数据库连接池,JDBC是一种服务供应接口(SPI),具体的数据库连接实 ...

  8. ReactJs和React Native的那些事

    介绍 1,React Js的目的 是为了使前端的V层更具组件化,能更好的复用,它能够使用简单的html标签创建更多的自定义组件标签,内部绑定事件,同时可以让你从操作dom中解脱出来,只需要操作数据就会 ...

  9. (NO.00001)iOS游戏SpeedBoy Lite成形记(二十一)

    现在游戏中如果钱用光了赌场也是不管的,所以我们要加上Game Over的逻辑. 出现游戏结束条件很简单,就是GameState的totalMoney <= 0.而在游戏结束时我们要做些什么呢?有 ...

  10. 018-继承-OC笔记

    学习目标 1.[掌握]Xcode开发文档 2.[掌握]static关键字 3.[掌握]self关键字 4.[掌握]继承 5.[掌握]NSObject 6.[掌握]访问修饰符 7.[掌握]私有实例变量和 ...