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

Installing PyGObject fails with pip on Debian Testing #183

Closed
flowerbug opened this issue Mar 31, 2020 · 18 comments
Closed

Installing PyGObject fails with pip on Debian Testing #183

flowerbug opened this issue Mar 31, 2020 · 18 comments

Comments

@flowerbug
Copy link

flowerbug commented Mar 31, 2020

ok, i'm not sure if this error is in Debian Testing or in Pycairo so I am sorry if this error should be filed with Debian or not. As they are in the middle of the 3.8 transition perhaps it is an issue there, but I can't tell myself as I'm not really sure what is going on.

to me it looks like the build process is trying to set up a 32 bit executable (-m32) and my system is a 64 bit.

while i do now have some i386 chunks on my system this error was happening before i added them (trying to see if it would make it work). so far no luck.

thanks for any ideas or feedback. :)

(env) me@ant(23)~/src/salsa/ngfp$ pip3 install ngfp
Collecting ngfp
  Using cached ngfp-0.2.3-py3-none-any.whl (906 kB)
Collecting pycairo
  Using cached pycairo-1.19.1.tar.gz (205 kB)
Collecting pyglet>=1.3.0
  Using cached pyglet-1.5.2-py2.py3-none-any.whl (1.0 MB)
Collecting pygobject
  Using cached PyGObject-3.36.0.tar.gz (714 kB)
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: /home/me/src/salsa/env/bin/python3 /home/me/src/salsa/env/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-fs_x712r/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel pycairo
       cwd: None
  Complete output (68 lines):
  Collecting setuptools
    Using cached setuptools-46.1.3-py3-none-any.whl (582 kB)
  Collecting wheel
    Using cached wheel-0.34.2-py2.py3-none-any.whl (26 kB)
  Collecting pycairo
    Using cached pycairo-1.19.1.tar.gz (205 kB)
  Building wheels for collected packages: pycairo
    Building wheel for pycairo (setup.py): started
    Building wheel for pycairo (setup.py): finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /home/me/src/salsa/env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-frm6hff0/pycairo/setup.py'"'"'; __file__='"'"'/tmp/pip-install-frm6hff0/pycairo/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/pip-wheel-y84jp4ar
         cwd: /tmp/pip-install-frm6hff0/pycairo/
    Complete output (21 lines):
    running bdist_wheel
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.8
    creating build/lib.linux-x86_64-3.8/cairo
    copying cairo/__init__.py -> build/lib.linux-x86_64-3.8/cairo
    copying cairo/__init__.pyi -> build/lib.linux-x86_64-3.8/cairo
    copying cairo/py.typed -> build/lib.linux-x86_64-3.8/cairo
    running build_ext
    building 'cairo._cairo' extension
    creating build/temp.linux-x86_64-3.8
    creating build/temp.linux-x86_64-3.8/cairo
    x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g3 -m32 -gdwarf-4 -fvar-tracking-assignments -w -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=19 -DPYCAIRO_VERSION_MICRO=1 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/home/me/src/salsa/env/include -I/usr/include/python3.8 -c cairo/device.c -o build/temp.linux-x86_64-3.8/cairo/device.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
    In file included from /usr/include/python3.8/Python.h:8,
                     from cairo/device.c:30:
    /usr/include/python3.8/pyconfig.h:7:12: fatal error: i386-linux-gnu/python3.8/pyconfig.h: No such file or directory
        7 | #  include <i386-linux-gnu/python3.8/pyconfig.h>
          |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    ----------------------------------------
    ERROR: Failed building wheel for pycairo
    Running setup.py clean for pycairo
  Failed to build pycairo
  Installing collected packages: setuptools, wheel, pycairo
      Running setup.py install for pycairo: started
      Running setup.py install for pycairo: finished with status 'error'
      ERROR: Command errored out with exit status 1:
       command: /home/me/src/salsa/env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-frm6hff0/pycairo/setup.py'"'"'; __file__='"'"'/tmp/pip-install-frm6hff0/pycairo/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-record-vsef537o/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-fs_x712r/overlay --compile --install-headers /home/me/src/salsa/env/include/site/python3.8/pycairo
           cwd: /tmp/pip-install-frm6hff0/pycairo/
      Complete output (21 lines):
      running install
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.8
      creating build/lib.linux-x86_64-3.8/cairo
      copying cairo/__init__.py -> build/lib.linux-x86_64-3.8/cairo
      copying cairo/__init__.pyi -> build/lib.linux-x86_64-3.8/cairo
      copying cairo/py.typed -> build/lib.linux-x86_64-3.8/cairo
      running build_ext
      building 'cairo._cairo' extension
      creating build/temp.linux-x86_64-3.8
      creating build/temp.linux-x86_64-3.8/cairo
      x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g3 -m32 -gdwarf-4 -fvar-tracking-assignments -w -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=19 -DPYCAIRO_VERSION_MICRO=1 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/home/me/src/salsa/env/include -I/usr/include/python3.8 -c cairo/device.c -o build/temp.linux-x86_64-3.8/cairo/device.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
      In file included from /usr/include/python3.8/Python.h:8,
                       from cairo/device.c:30:
      /usr/include/python3.8/pyconfig.h:7:12: fatal error: i386-linux-gnu/python3.8/pyconfig.h: No such file or directory
          7 | #  include <i386-linux-gnu/python3.8/pyconfig.h>
            |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      compilation terminated.
      error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
      ----------------------------------------
  ERROR: Command errored out with exit status 1: /home/me/src/salsa/env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-frm6hff0/pycairo/setup.py'"'"'; __file__='"'"'/tmp/pip-install-frm6hff0/pycairo/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-record-vsef537o/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-fs_x712r/overlay --compile --install-headers /home/me/src/salsa/env/include/site/python3.8/pycairo Check the logs for full command output.
  ----------------------------------------
ERROR: Command errored out with exit status 1: /home/me/src/salsa/env/bin/python3 /home/me/src/salsa/env/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-fs_x712r/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel pycairo Check the logs for full command output.
(env) me@ant(24)~/src/salsa/ngfp$ 

@lazka
Copy link
Member

lazka commented Mar 31, 2020

If you mean pip install pygobject being broken on Debian sid/Ubuntu focal. Yes, I've noticed that it's broken, and it worked 1-2 weeks ago, and I don't quite know why it fails. I've only checked with Arch so far where things still seem to work, so I hope it's a temporary error :/

@flowerbug
Copy link
Author

ok, i just added more info... does that help?

@flowerbug
Copy link
Author

yes

root@ant(47)~# dpkg -l | grep python3.8-dev
ii libpython3.8-dev:amd64 3.8.2-1 amd64 Header files and a static library for Python (v3.8)
ii python3.8-dev 3.8.2-1 amd64 Header files and a static library for Python (v3.8)

@lazka
Copy link
Member

lazka commented Mar 31, 2020

yeah, just noticed the i386 part. That's... really weird. This error is different to what I meant btw (and might only affect Debian sid)

@flowerbug
Copy link
Author

that is ok :) glad someone is listening even if i don't know what is going on. i'm too much of a python newbie to really understand how it does some things... still learning... :) thanks, i appreciate it even if it ends up the error is elsewhere...

@lazka
Copy link
Member

lazka commented Mar 31, 2020

So somehow your compiler gets passed "-m32" (see in your logs) which makes it try to compile for 32 bit which in turn makes it look for the 32bit Python dev files. Not sure why. Do you have any CFLAGS set in your environment?

@flowerbug
Copy link
Author

flowerbug commented Mar 31, 2020

i actually do! oh my... how dumb of me. another project does use them and i didn't switch them off...

i think this is python and not C... oops.

@flowerbug
Copy link
Author

flowerbug commented Mar 31, 2020

ok, progress! at least not that error any more:

(env) me@ant(27)~/src/salsa/ngfp$ pip3 install ngfp
Collecting ngfp
  Using cached ngfp-0.2.3-py3-none-any.whl (906 kB)
Collecting pygobject
  Using cached PyGObject-3.36.0.tar.gz (714 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /home/me/src/salsa/env/bin/python3 /home/me/src/salsa/env/share/python-wheels/pep517-0.7.0-py2.py3-none-any.whl/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpa1ql8m8h
       cwd: /tmp/pip-install-71uiugvn/pygobject
  Complete output (1 lines):
  /home/me/src/salsa/env/bin/python3: can't find '__main__' module in '/home/me/src/salsa/env/share/python-wheels/pep517-0.7.0-py2.py3-none-any.whl/pep517/_in_process.py'
  ----------------------------------------
ERROR: Command errored out with exit status 1: /home/me/src/salsa/env/bin/python3 /home/me/src/salsa/env/share/python-wheels/pep517-0.7.0-py2.py3-none-any.whl/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpa1ql8m8h Check the logs for full command output.

no idea what that means either, but at least it is getting past previous error. :) thanks

@lazka
Copy link
Member

lazka commented Mar 31, 2020

Yes, that's the error I'm currently having as well. No idea sadly :(

@flowerbug
Copy link
Author

flowerbug commented Mar 31, 2020

that is ok, good thing this isn't world critical just something i was going play with.

can i backtrack on dependencies to get a previous gobject version that will work (or something else)? i've not changed any of my code so it is only some other thing that is causing this.

@lazka
Copy link
Member

lazka commented Mar 31, 2020

Old versions also fail to install, so I don't have a workaround right now.

@flowerbug
Copy link
Author

flowerbug commented Mar 31, 2020

ok, thank you, i guess you can close this then. :) hope you have a good day in the middle of all the rest of what is going on...

@lazka
Copy link
Member

lazka commented Mar 31, 2020

I've filed a bug report with pip: pypa/pip#7946

@lazka lazka changed the title python3.8 support? Installing PyGObject fails with pip on Debian Testing Mar 31, 2020
@flowerbug
Copy link
Author

flowerbug commented Mar 31, 2020

i'm nosing around. wondering if this is the base issue... looks related. no idea where the solution might be.

pypa/wheel#344 not sure...

@lazka
Copy link
Member

lazka commented Mar 31, 2020

The workaround is to install pip via pypi as the Debian version is broken: (in the venv) pip install -U --force-reinstall pip

@lazka
Copy link
Member

lazka commented Mar 31, 2020

Debian bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=955414

@flowerbug
Copy link
Author

flowerbug commented Mar 31, 2020

great! thank you so much! :) i verify that this fixed all the problems. :)

@lazka
Copy link
Member

lazka commented Mar 31, 2020

Thanks for confirming.

I think we can close this.

@lazka lazka closed this as completed Mar 31, 2020
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