-1

When installing cryptography the wheel fails to build and pip outputs the following error code:

build/temp.linux-x86_64-2.7/_openssl.c:12:12: fatal error: pyconfig.h: No such file or directory
#  include <pyconfig.h>
          ^~~~~~~~~~~~
compilation terminated.
error: command 'cc' failed with exit status 1

Previous instances of this problem suggest that this is an issue with Python headers and recommend installing build-essential libssl-dev libffi-dev python-dev However these packages are already installed on my system. All the dev packages are there; no packages suggested from previous, already answered issues are missing

Where's the issue then?

E. Jole
  • 11
  • 1
  • The suggested duplicate is 4th in Google on _pip "pyconfig.h: No such file or directory"_. – ivan_pozdeev Sep 12 '18 at 17:41
  • 1
    @ivan_pozdeev already followed those steps. thus the new question. – E. Jole Sep 12 '18 at 19:07
  • Well, you need to get the headers for your `pypy` somehow and make the compiler see them. How depends on how you got your `pypy` (I checked that the headers come with the download on the official site) and how you're compiling the extension -- [which you didn't provide the details for](/help/mcve). – ivan_pozdeev Sep 12 '18 at 19:16

1 Answers1

1

The Python library development files need to be installed to compile extensions from source. Do you have libpython-dev installed ?

apt-get install libpython-dev
ivan_pozdeev
  • 33,874
  • 19
  • 107
  • 152
lostbard
  • 5,065
  • 1
  • 15
  • 17