Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error installing jsonobject on AWS EC2 instance #174

Open
wabiloo opened this issue Apr 6, 2020 · 1 comment
Open

Error installing jsonobject on AWS EC2 instance #174

wabiloo opened this issue Apr 6, 2020 · 1 comment

Comments

@wabiloo
Copy link

wabiloo commented Apr 6, 2020

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
@PeterJCLaw
Copy link
Contributor

PeterJCLaw commented Mar 11, 2022

This error looks like the usual error you get when building native packages on a machine that doesn't have the Python development headers. I'm not familiar enough with Centos to tell you the package to install from your package manager, but it's probably something like python3-dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants