gp-saml-gui icon indicating copy to clipboard operation
gp-saml-gui copied to clipboard

Unable to install, fixed with more apt installs (maybe update readme?)

Open ronlawrence3 opened this issue 3 years ago • 2 comments

Using python 3.8.5 in pyenv on pop-os 20.10 (ubuntu 20.10). I installed the apt packages specified, set my local python to 3.8.5, then did the following:

ron@pop-os:~$ pip3 install https://github.com/dlenski/gp-saml-gui/archive/master.zip
Collecting https://github.com/dlenski/gp-saml-gui/archive/master.zip
  Using cached https://github.com/dlenski/gp-saml-gui/archive/master.zip
Collecting requests
  Using cached requests-2.25.1-py2.py3-none-any.whl (61 kB)
Collecting pygobject
  Using cached PyGObject-3.40.1.tar.gz (714 kB)
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: /home/ron/.pyenv/versions/3.8.5/bin/python3.8 /home/ron/.pyenv/versions/3.8.5/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-07viv83v/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel pycairo
       cwd: None
  Complete output (40 lines):
  Collecting setuptools
    Using cached setuptools-56.0.0-py3-none-any.whl (784 kB)
  Collecting wheel
    Using cached wheel-0.36.2-py2.py3-none-any.whl (35 kB)
  Collecting pycairo
    Using cached pycairo-1.20.0.tar.gz (344 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 wheel metadata: started
      Preparing wheel metadata: finished with status 'done'
  Building wheels for collected packages: pycairo
    Building wheel for pycairo (PEP 517): started
    Building wheel for pycairo (PEP 517): finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /home/ron/.pyenv/versions/3.8.5/bin/python3.8 /home/ron/.pyenv/versions/3.8.5/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmpataepmrk
         cwd: /tmp/pip-install-tse1150j/pycairo
    Complete output (15 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
    Package cairo was not found in the pkg-config search path.
    Perhaps you should add the directory containing `cairo.pc'
    to the PKG_CONFIG_PATH environment variable
    Package 'cairo', required by 'virtual:world', not found
    Command '['pkg-config', '--print-errors', '--exists', 'cairo >= 1.15.10']' returned non-zero exit status 1.
    ----------------------------------------
    ERROR: Failed building wheel for pycairo
  Failed to build pycairo
  ERROR: Could not build wheels for pycairo which use PEP 517 and cannot be installed directly
  WARNING: You are using pip version 20.1.1; however, version 21.0.1 is available.
  You should consider upgrading via the '/home/ron/.pyenv/versions/3.8.5/bin/python3.8 -m pip install --upgrade pip' command.
  ----------------------------------------
ERROR: Command errored out with exit status 1: /home/ron/.pyenv/versions/3.8.5/bin/python3.8 /home/ron/.pyenv/versions/3.8.5/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-07viv83v/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.
WARNING: You are using pip version 20.1.1; however, version 21.0.1 is available.
You should consider upgrading via the '/home/ron/.pyenv/versions/3.8.5/bin/python3.8 -m pip install --upgrade pip' command.

Seemed like I was missing libraries. So I installed these (over a few iterations, some may not be needed):

sudo apt install libcairo2-dev pkg-config python3-dev cairo-5c libcairo-5c-dev libcairo-gobject2 python3-cairocffi libgirepository1.0-dev

And now I get the package to install.

ronlawrence3 avatar Apr 14 '21 14:04 ronlawrence3

sudo apt-get update
sudo apt-get --no-install-recommends install python3-pip python3-cairo python3-gi gir1.2-gtk-3.0 gir1.2-webkit2-4.0
python3 -m pip install --user 'https://github.com/dlenski/gp-saml-gui/archive/master.zip'
~/.local/bin/gp-saml-gui -h

If, for God knows why, you want to build pycairo:

sudo apt-get --no-install-recommends install pkg-config libcairo2-dev libpython3-dev gcc

concatime avatar Jun 20 '22 02:06 concatime

If, for God knows why, you want to build pycairo:

Coming here along my journey, using a Ubuntu 22.04 VM on an M1 MacBook. I guess there are no wheels for aarch64 prebuilt.

MaxWinterstein avatar Feb 15 '23 10:02 MaxWinterstein