简体   繁体   English

使用pip安装笔记本时出错

[英]Error while installing notebook using pip

note: I am on linux(ubuntu,mint) 注意:我在linux(ubuntu,mint)上

I am trying to install jupyter. 我正在尝试安装jupyter。 But after some searching I realised that the error I have when trying to install jupyter is due to notebook. 但是经过一番搜索,我意识到尝试安装jupyter时遇到的错误是由于笔记本引起的。

So here is the error I have when trying to install notebook using sudo pip install notebook . 所以这是我尝试使用sudo pip install notebook安装笔记本时遇到的错误。

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

If you want here is the whole output of pip install notebook . 如果要在此处显示pip install notebook的整个输出。

Thank for answers in advance. 预先感谢您的答复。

This is the relevant part of the error message: 这是错误消息的相关部分:

_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

You need the Python headers: 您需要Python标头:

sudo apt-get install python-dev

Your installation process tries to compile an extension with gcc and you seem to be missing the necessary decencies. 您的安装过程尝试使用gcc编译扩展,而您似乎缺少必要的规范。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM