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

Installation issue on Fedora 36 #179

Closed
octvs opened this issue May 29, 2022 · 2 comments
Closed

Installation issue on Fedora 36 #179

octvs opened this issue May 29, 2022 · 2 comments

Comments

@octvs
Copy link

octvs commented May 29, 2022

Hey there, I followed the instructions for Fedora from here #111.
After installing OS level dependencies, I have an error installing on a fresh venv.

Here is the error

$ pip3 install pygobject
Collecting pygobject
  Using cached PyGObject-3.42.1.tar.gz (718 kB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [45 lines of output]
      Collecting setuptools
        Using cached setuptools-62.3.2-py3-none-any.whl (1.2 MB)
      Collecting wheel
        Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
      Collecting pycairo
        Using cached pycairo-1.21.0.tar.gz (340 kB)
        Installing build dependencies: started
        Installing build dependencies: finished with status 'done'
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'done'
        Preparing metadata (pyproject.toml): started
        Preparing metadata (pyproject.toml): finished with status 'done'
      Building wheels for collected packages: pycairo
        Building wheel for pycairo (pyproject.toml): started
        Building wheel for pycairo (pyproject.toml): finished with status 'error'
        error: subprocess-exited-with-error
      
        × Building wheel for pycairo (pyproject.toml) did not run successfully.
        │ exit code: 1
        ╰─> [19 lines of output]
            running bdist_wheel
            running build
            running build_py
            creating build
            creating build/lib.linux-x86_64-cpython-310
            creating build/lib.linux-x86_64-cpython-310/cairo
            copying cairo/__init__.py -> build/lib.linux-x86_64-cpython-310/cairo
            copying cairo/__init__.pyi -> build/lib.linux-x86_64-cpython-310/cairo
            copying cairo/py.typed -> build/lib.linux-x86_64-cpython-310/cairo
            running build_ext
            building 'cairo._cairo' extension
            creating build/temp.linux-x86_64-cpython-310
            creating build/temp.linux-x86_64-cpython-310/cairo
            gcc -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=21 -DPYCAIRO_VERSION_MICRO=0 -I/usr/include/cairo -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/libxml2 -I/usr/include/pixman-1 -I/home/cenkt/.venvs/env-gnomecast/include -I/usr/include/python3.10 -c cairo/bufferproxy.c -o build/temp.linux-x86_64-cpython-310/cairo/bufferproxy.o -Wall -Warray-bounds -Wcast-align -Wconversion -Wextra -Wformat=2 -Wformat-nonliteral -Wformat-security -Wimplicit-function-declaration -Winit-self -Winline -Wmissing-format-attribute -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpacked -Wpointer-arith -Wreturn-type -Wshadow -Wsign-compare -Wstrict-aliasing -Wundef -Wunused-but-set-variable -Wswitch-default -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-command-line-argument -fno-strict-aliasing -fvisibility=hidden -std=c99
            cairo/bufferproxy.c:32:10: fatal error: Python.h: No such file or directory
               32 | #include <Python.h>
                  |          ^~~~~~~~~~
            compilation terminated.
            error: command '/usr/bin/gcc' failed with exit code 1
            [end of output]
      
        note: This error originates from a subprocess, and is likely not a problem with pip.
        ERROR: Failed building wheel for pycairo
      Failed to build pycairo
      ERROR: Could not build wheels for pycairo, which is required to install pyproject.toml-based projects
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Os level pkgs are here

$ yum list --installed | grep cairo
cairo.x86_64                                         1.17.6-1.fc36                       @anaconda               
cairo-devel.x86_64                                   1.17.6-1.fc36                       @fedora                 
cairo-gobject.x86_64                                 1.17.6-1.fc36                       @anaconda               
cairo-gobject-devel.x86_64                           1.17.6-1.fc36                       @fedora                 
cairomm.x86_64                                       1.14.2-22.fc36                      @anaconda               
python3-cairo.x86_64                                 1.21.0-1.fc36                       @updates                
@nbenitez
Copy link

fatal error: Python.h: No such file or directory

A quick google search give me this:
https://stackoverflow.com/questions/21530577/fatal-error-python-h-no-such-file-or-directory

Let us know if it worked :-)

@octvs
Copy link
Author

octvs commented Jul 24, 2022

I just tried without a venv and it worked. Probably it had somehow a problem to reach to system wide packages. Cheers!

@octvs octvs closed this as completed Jul 24, 2022
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