[PYTHON] I can't install Dask with pip on Ubuntu

pip install "dask[complete]"

However, I get the following error.

 ERROR: Command errored out with exit status 1:
   command: /home/xxx/.virtualenvs/main/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-r_tsl8qg/psutil/setup.py'"'"'; __file__='"'"'/tmp/pip-install-r_tsl8qg/psutil/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-2vmihue5 --python-tag cp36
       cwd: /tmp/pip-install-r_tsl8qg/psutil/
  Complete output (44 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.6
  creating build/lib.linux-x86_64-3.6/psutil
  copying psutil/_pslinux.py -> build/lib.linux-x86_64-3.6/psutil
  copying psutil/_psaix.py -> build/lib.linux-x86_64-3.6/psutil
  copying psutil/_psposix.py -> build/lib.linux-x86_64-3.6/psutil
  copying psutil/_pswindows.py -> build/lib.linux-x86_64-3.6/psutil
  copying psutil/__init__.py -> build/lib.linux-x86_64-3.6/psutil
  copying psutil/_pssunos.py -> build/lib.linux-x86_64-3.6/psutil
  copying psutil/_compat.py -> build/lib.linux-x86_64-3.6/psutil
  copying psutil/_common.py -> build/lib.linux-x86_64-3.6/psutil
  copying psutil/_psosx.py -> build/lib.linux-x86_64-3.6/psutil
  copying psutil/_psbsd.py -> build/lib.linux-x86_64-3.6/psutil
  creating build/lib.linux-x86_64-3.6/psutil/tests
  copying psutil/tests/runner.py -> build/lib.linux-x86_64-3.6/psutil/tests
  copying psutil/tests/test_misc.py -> build/lib.linux-x86_64-3.6/psutil/tests
  copying psutil/tests/test_linux.py -> build/lib.linux-x86_64-3.6/psutil/tests
  copying psutil/tests/test_sunos.py -> build/lib.linux-x86_64-3.6/psutil/tests
  copying psutil/tests/__init__.py -> build/lib.linux-x86_64-3.6/psutil/tests
  copying psutil/tests/test_connections.py -> build/lib.linux-x86_64-3.6/psutil/tests
  copying psutil/tests/test_osx.py -> build/lib.linux-x86_64-3.6/psutil/tests
  copying psutil/tests/test_aix.py -> build/lib.linux-x86_64-3.6/psutil/tests
  copying psutil/tests/__main__.py -> build/lib.linux-x86_64-3.6/psutil/tests
  copying psutil/tests/test_contracts.py -> build/lib.linux-x86_64-3.6/psutil/tests
  copying psutil/tests/test_posix.py -> build/lib.linux-x86_64-3.6/psutil/tests
  copying psutil/tests/test_unicode.py -> build/lib.linux-x86_64-3.6/psutil/tests
  copying psutil/tests/test_windows.py -> build/lib.linux-x86_64-3.6/psutil/tests
  copying psutil/tests/test_process.py -> build/lib.linux-x86_64-3.6/psutil/tests
  copying psutil/tests/test_system.py -> build/lib.linux-x86_64-3.6/psutil/tests
  copying psutil/tests/test_bsd.py -> build/lib.linux-x86_64-3.6/psutil/tests
  copying psutil/tests/test_memory_leaks.py -> build/lib.linux-x86_64-3.6/psutil/tests
  running build_ext
  building 'psutil._psutil_linux' extension
  creating build/temp.linux-x86_64-3.6
  creating build/temp.linux-x86_64-3.6/psutil
  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 -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=565 -DPSUTIL_LINUX=1 -I/usr/include/python3.6m -I/home/xxx/.virtualenvs/main/include/python3.6m -c psutil/_psutil_common.c -o build/temp.linux-x86_64-3.6/psutil/_psutil_common.o
  psutil/_psutil_common.c:9:10: fatal error: Python.h: No such file or directory
   #include <Python.h>
            ^~~~~~~~~~
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for psutil

This is because there is no Python header file.

If it is 2 system

sudo apt install python-dev

If it is 3 system

sudo apt install python3-dev

Can be solved with.

Recommended Posts

I can't install Dask with pip on Ubuntu
Install pip / pip3 on Ubuntu
I can't install the package with pip.
I got a UnicodeDecodeError when pip install on ubuntu
I can't install python3 with pyenv-vertualenv
I can't install mysql-connector-python with anaconda
I want to pip install with PythonAnywhere
scipy stumbles with pip install on python 2.7.8
Install TensorFlow on Ubuntu
Install pip on Mavericks
Avoiding "'ascii' codec can't decode" with pip install
Install PySide2 on Ubuntu
Error with pip install
Install pip and pandas with Ubuntu or VScode
I can't install Anaconda!
Install JModelica on Ubuntu
Install Python 3.3 on Ubuntu 12.04
Install Theano on Ubuntu 12.04
Install angr on Ubuntu 18.04
Install scikit.learn with pip
[Small story] I can't find it even though I apt search to install Python on ubuntu with Docker.
I made a Python3 environment on Ubuntu with direnv.
Dealing with pip and related installation errors on Ubuntu 18.04
I installed tensorRT on Ubuntu 18.04
When moss with pip install
I installed ROS on Ubuntu 18.04
Install github repository with pip
Install GoLand IDE on Ubuntu
Install OpenCV on Ubuntu + python
wsl Install PostgreSQL on Ubuntu 18.04
[ROS] Install ROS (melodic) on Ubuntu (18.04)
I can't search with # google-map. ..
Install Caffe on Ubuntu 14.04 (GPU)
Install Docker on WSL Ubuntu 18.04
I got an error when pip install pandas on Mac, so I dealt with it
Can't find the package you installed with pip install --user?
Install python3 and scientific calculation library on Ubuntu (virtualenv + pip)
Install Jupiter Notebook on Windows with pip in proxy environment
I have libncurses but get angry with pip install readline
I got an error when pip install tweepy on macOS Sierra, so I dealt with it
Install CUDA10.1 + cuDNN7.6.5 + tensorflow-2.3.0 on Ubuntu 18.04
Install Python 3.8 on Ubuntu 18.04 (OS standard)
Install Caffe on Ubuntu 14.04 (CPU mode)
Install Python 2.7.9 and Python 3.4.x with pip.
Pip install --ugrade pip fails on Windows
Install Mecab and mecab-python3 on Ubuntu 14.04
Install and run dropbox on Ubuntu 20.04
Install OpenCV and Chainer on Ubuntu
Install CUDA 8.0 and Chainer on Ubuntu 16.04
Install Python 3.8 on Ubuntu 20.04 (OS standard)
Permission denied with pip install pyopenssl
Draw Japanese with matplotlib on Ubuntu
Install Python on Windows + pip + virtualenv
I can't download images with Google_images_download
Mount S3 on Ubuntu with goofys
I tried Cython on Ubuntu on VirtualBox
Manipulate colors with pip install color
Install pip on CentOS7. Also iPython.
Install pyStruct on MacOSX10.11 with macports
I can't install scikit-learn in Python
Install fabric on Ubuntu and try