title: Locust installation: psutil compilation failed with exit status 1 Python.h: No such file or directory
body: <p>I am installing locust using command <code>pip3 install locust</code>. I am faced with a series of errors which I am unable to understand and debug, kindly help me with what went wrong. Any help is appreciated.I have python 3.8 and python 2.7 both installed on my system.</p>
  <p>Here are the errors shown to me</p>
  <pre><code>Building wheels for collected packages: ConfigArgParse, psutil, Flask-BasicAuth
    Building wheel for ConfigArgParse (setup.py) ... done
    Created wheel for ConfigArgParse: filename=ConfigArgParse-1.2.3-py3-none-any.whl size=19328 sha256=54fe7f6915dc7cc03d14e51ca38e015ba107e0e1234a06bdc0641dcc1ee72ab3
    Stored in directory: /home/saranyagupta05/.cache/pip/wheels/b4/12/fe/1e4628f6ec22a9580d9e8fbef23df7a03948a1edde0821d7f5
    Building wheel for psutil (setup.py) ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '&quot;'&quot;'/tmp/pip-install-myqwf0hr/psutil/setup.py'&quot;'&quot;'; __file__='&quot;'&quot;'/tmp/pip-install-myqwf0hr/psutil/setup.py'&quot;'&quot;';f=getattr(tokenize, '&quot;'&quot;'open'&quot;'&quot;', open)(__file__);code=f.read().replace('&quot;'&quot;'\r\n'&quot;'&quot;', '&quot;'&quot;'\n'&quot;'&quot;');f.close();exec(compile(code, __file__, '&quot;'&quot;'exec'&quot;'&quot;'))' bdist_wheel -d /tmp/pip-wheel-sk_etsgc
         cwd: /tmp/pip-install-myqwf0hr/psutil/
    Complete output (45 lines):
    running bdist_wheel
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.8
    creating build/lib.linux-x86_64-3.8/psutil
    copying psutil/_pslinux.py -&gt; build/lib.linux-x86_64-3.8/psutil
    copying psutil/_pswindows.py -&gt; build/lib.linux-x86_64-3.8/psutil
    copying psutil/_psposix.py -&gt; build/lib.linux-x86_64-3.8/psutil
    copying psutil/_pssunos.py -&gt; build/lib.linux-x86_64-3.8/psutil
    copying psutil/_common.py -&gt; build/lib.linux-x86_64-3.8/psutil
    copying psutil/_psbsd.py -&gt; build/lib.linux-x86_64-3.8/psutil
    copying psutil/_psosx.py -&gt; build/lib.linux-x86_64-3.8/psutil
    copying psutil/__init__.py -&gt; build/lib.linux-x86_64-3.8/psutil
    copying psutil/_compat.py -&gt; build/lib.linux-x86_64-3.8/psutil
    copying psutil/_psaix.py -&gt; build/lib.linux-x86_64-3.8/psutil
    creating build/lib.linux-x86_64-3.8/psutil/tests
    copying psutil/tests/runner.py -&gt; build/lib.linux-x86_64-3.8/psutil/tests
    copying psutil/tests/test_memleaks.py -&gt; build/lib.linux-x86_64-3.8/psutil/tests
    copying psutil/tests/test_linux.py -&gt; build/lib.linux-x86_64-3.8/psutil/tests
    copying psutil/tests/test_windows.py -&gt; build/lib.linux-x86_64-3.8/psutil/tests
    copying psutil/tests/test_posix.py -&gt; build/lib.linux-x86_64-3.8/psutil/tests
    copying psutil/tests/test_unicode.py -&gt; build/lib.linux-x86_64-3.8/psutil/tests
    copying psutil/tests/test_contracts.py -&gt; build/lib.linux-x86_64-3.8/psutil/tests
    copying psutil/tests/test_sunos.py -&gt; build/lib.linux-x86_64-3.8/psutil/tests
    copying psutil/tests/test_testutils.py -&gt; build/lib.linux-x86_64-3.8/psutil/tests
    copying psutil/tests/test_aix.py -&gt; build/lib.linux-x86_64-3.8/psutil/tests
    copying psutil/tests/__main__.py -&gt; build/lib.linux-x86_64-3.8/psutil/tests
    copying psutil/tests/test_connections.py -&gt; build/lib.linux-x86_64-3.8/psutil/tests
    copying psutil/tests/test_misc.py -&gt; build/lib.linux-x86_64-3.8/psutil/tests
    copying psutil/tests/test_system.py -&gt; build/lib.linux-x86_64-3.8/psutil/tests
    copying psutil/tests/__init__.py -&gt; build/lib.linux-x86_64-3.8/psutil/tests
    copying psutil/tests/test_bsd.py -&gt; build/lib.linux-x86_64-3.8/psutil/tests
    copying psutil/tests/test_process.py -&gt; build/lib.linux-x86_64-3.8/psutil/tests
    copying psutil/tests/test_osx.py -&gt; build/lib.linux-x86_64-3.8/psutil/tests
    running build_ext
    building 'psutil._psutil_linux' extension
    creating build/temp.linux-x86_64-3.8
    creating build/temp.linux-x86_64-3.8/psutil
    x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=572 -DPSUTIL_LINUX=1 -I/usr/include/python3.8 -c psutil/_psutil_common.c -o build/temp.linux-x86_64-3.8/psutil/_psutil_common.o
    psutil/_psutil_common.c:9:10: fatal error: Python.h: No such file or directory
        9 | #include &lt;Python.h&gt;
          |          ^~~~~~~~~~
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    ----------------------------------------
  </code></pre>