Failed building wheel for jsonlib | Linux Mint 19

Viewed 311

I know there's a lot of question like Failed to building wheels for XXX package. But I tried some of the aswers that i found here, and no one give me some solution, obviusly I'm doing something wrong but i can't figure what.

I tried this in the first place:

sudo apt-get install gcc libpq-dev -y
sudo apt-get install python-dev  python-pip -y
sudo apt-get install python3-dev python3-pip python3-venv python3-wheel -y
pip3 install wheel

this worked for wheel, it's currently installed, but when i try again

pip3 install jsonlib

It doesn't work and triggers the wheel building error:

Building wheels for collected packages: jsonlib
  Running setup.py bdist_wheel for jsonlib ... error
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-q5fz1h6c/jsonlib/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/tmpr5c887d4pip-wheel- --python-tag cp36:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.6
  copying jsonlib.py -> build/lib.linux-x86_64-3.6
  running build_ext
  building '_jsonlib' extension
  creating build/temp.linux-x86_64-3.6
  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 -I/usr/include/python3.6m -c _jsonlib.c -o build/temp.linux-x86_64-3.6/_jsonlib.o
  _jsonlib.c:18:10: fatal error: Python.h: No existe el archivo o el directorio
   #include <Python.h>
            ^~~~~~~~~~
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  
  ----------------------------------------
  Failed building wheel for jsonlib
  Running setup.py clean for jsonlib
  Failed to build jsonlib
  Installing collected packages: jsonlib
  Running setup.py install for jsonlib ... error

    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    
    ----------------------------------------

Thanks!

0 Answers
Related