Linux Mint 21.3 Cinnamon - errors when trying to install required packages
Minty-stack opened this issue · comments
I am following the instructions from https://github.com/DevilXD/TwitchDropsMiner/wiki/Setting-up-the-environment,-building-and-running but unfortunately hit some errors that prevent me from running this on Linux Mint - could anyone help diagnose the problem?
I have just now successfully cloned the repo with git clone https://github.com/DevilXD/TwitchDropsMiner
python -m venv env
and source ./env/bin/activate
work fine, and I get the (env)
prefix correctly, but when I next run pip install -r requirements.txt
I get the following:
Ignoring pywin32: markers 'sys_platform == "win32"' don't match your environment
Collecting aiohttp<4.0,>=3.9
Using cached aiohttp-3.9.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB)
Collecting Pillow
Using cached pillow-10.4.0-cp310-cp310-manylinux_2_28_x86_64.whl (4.5 MB)
Collecting pystray
Using cached pystray-0.19.5-py2.py3-none-any.whl (49 kB)
Collecting PyGObject<3.47
Using cached PyGObject-3.46.0.tar.gz (723 kB)
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [41 lines of output]
Collecting setuptools
Using cached setuptools-70.2.0-py3-none-any.whl (930 kB)
Collecting wheel
Using cached wheel-0.43.0-py3-none-any.whl (65 kB)
Collecting pycairo
Using cached pycairo-1.26.1.tar.gz (346 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
╰─> [15 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
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
No package 'cairo' found
Command '['pkg-config', '--print-errors', '--exists', 'cairo >= 1.15.10']' returned non-zero exit status 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.
I'm still new to Linux - am I doing something wrong, do I need to manually install some extra packages? Would appreciate any help, thank you in advance!
do I need to manually install some extra packages?
You do. Installing the following packages should be enough in your case:
gir1.2-appindicator3-0.1 libcairo2-dev libgirepository1.0-dev
And then retry that pip install
command.
FWIW, this is likely a duplicate of #221.
I'll try to properly document the required system dependencies on Linux in the following days...
That worked, thank you very much!
Just for reference, and so I can learn something from this - is there any way to tell from the output (or in any other way) which packages are missing, so if anything similar happens in the future I can try solving the problem on my own?
Sometimes you can... From the output you posted:
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
No package 'cairo' found
From that I inferred you were missing the libcairo2-dev
package. And the other two packages are necessary for the system tray feature to work.
I see, thanks a lot! I did try searching for "cairo" and "cairo.pc" in the Software Manager, but it gave me no useful hits - seems I still have a looooot to learn. Thank you so much regardless!