Skip to content

Error installing jsonobject on AWS EC2 instance #174

@wabiloo

Description

@wabiloo

When I try to pip3 install jsonobject--0.9.9 on an EC2 Linux instance (Centos), I get the following error:

  Running setup.py install for jsonobject ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-2i5hstnb/jsonobject/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-srnz0j8s-record/install-record.txt --single-version-externally-managed --compile:
    You are running without Cython installed. It is highly recommended to run
      pip install cython>=0.29.1,<1.0.0
    before you continue
    /usr/lib64/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'long_description_content_type'
      warnings.warn(msg)
    Warning: 'classifiers' should be a list, got type 'tuple'
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.7
    creating build/lib.linux-x86_64-3.7/jsonobject
    copying jsonobject/__init__.py -> build/lib.linux-x86_64-3.7/jsonobject
    copying jsonobject/exceptions.py -> build/lib.linux-x86_64-3.7/jsonobject
    running build_ext
    building 'jsonobject.api' extension
    creating build/temp.linux-x86_64-3.7
    creating build/temp.linux-x86_64-3.7/jsonobject
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python3.7m -c jsonobject/api.c -o build/temp.linux-x86_64-3.7/jsonobject/api.o
    jsonobject/api.c:16:10: fatal error: Python.h: No such file or directory
     #include "Python.h"
              ^~~~~~~~~~
    compilation terminated.
    error: command 'gcc' failed with exit status 1```

I installed a supported version of Cython, but that still didn't solve the issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions