Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Additions for Fedora, Opensuse and general Linux #1196

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

boredsquirrel
Copy link

I started by adding up-to-date version infos for Fedora. Then I added the instructions for Toolbox and Distrobox, toolbox being standard on Fedora Atomic, Distrobox on Opensuse microOS but also working on Fedora Atomic.

These tools create containers of a Distro, so the QGis packages can be isolated from the host system.

GUI app entries are included in the explanations.


Then I added an instruction to add missing python dependencies using pip, under the main Linux chapter.

I also added a tutorial how to enforce XWayland, as Wayland shows a warning of missing features. This is opt-in but automated.

I started by adding up-to-date version infos for Fedora. Then I added the instructions for Toolbox and Distrobox, toolbox being standard on Fedora Atomic, Distrobox on Opensuse microOS but also working on Fedora Atomic. 

These tools create containers of a Distro, so the QGis packages can be isolated from the host system.

GUI app entries are included in the explanations.

---

Then I added an instruction to add missing python dependencies using pip, under the main Linux chapter.

I also added a tutorial how to enforce XWayland, as Wayland shows a warning of missing features. This is opt-in but automated.
@boredsquirrel
Copy link
Author

Question: This version number tables add unnecessary maintenance work. Just linking to a site having the version numbers would seem to make more sense.

Oh and I also added two ways to remove the Fedora COPR, as its deprecated and could cause conflicts

source/site/forusers/alldownloads.rst Outdated Show resolved Hide resolved
source/site/forusers/alldownloads.rst Outdated Show resolved Hide resolved
source/site/forusers/alldownloads.rst Outdated Show resolved Hide resolved
source/site/forusers/alldownloads.rst Outdated Show resolved Hide resolved
source/site/forusers/alldownloads.rst Outdated Show resolved Hide resolved
boredsquirrel and others added 4 commits November 5, 2023 11:56
Co-authored-by: Andrea Giudiceandrea <[email protected]>
Co-authored-by: Andrea Giudiceandrea <[email protected]>
source/site/forusers/alldownloads.rst Outdated Show resolved Hide resolved
source/site/forusers/alldownloads.rst Outdated Show resolved Hide resolved
@boredsquirrel
Copy link
Author

qgis/QGIS#46031

Issue about the Wayland warning

@frankbroniewski
Copy link
Contributor

Hello, whilst tackling https://github.com/qgis/QGIS-Website/issues/1224 I noticed the proposed changes in the documentation concerning Python package installation instructions.

Because I recently had to tackle Python package installations on OpenSuse, I learned about PEP668 and the implications on installing packages via pip. Hence I allowed myself to propose the following PR to describe Python module installation on Linux Systems: https://github.com/qgis/QGIS-Website/pull/1225

In short, PEP668 lets Linux system distributions forbid to install Python packages system wide via pip in order to maintain system integrity. It is encouraged instead to install Python packages in a virtual environment, which can be done via pipx, which should be widely available in the distribution's repository.

@boredsquirrel
Copy link
Author

boredsquirrel commented Feb 20, 2024

I am on Fedora Atomic and pip falls back to user installation automatically. pip install --user should do that.

Also cleaned up my additions a lot, should be way better now. Would be nice to have it merged or resolved soon.

removed duplicate lines, unneeded details, shortened commands, changed some names to be more clear.  Also removed hardcoded version numbers from Toolbox+Distrobox, reducing maintenance (and its unnecessary).

This should be way more user friendly now.
removed duplicate lines, unneeded details, shortened commands, changed some names to be more clear.  Also removed hardcoded version numbers from Toolbox+Distrobox, reducing maintenance (and its unnecessary).

This should be way more user friendly now.
probably cosmetic, seemed unconventional for me
@frankbroniewski
Copy link
Contributor

No, unfortunately, pip install --user fails as well:

frank@schnipsel:~> pip install --user flask
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try
    zypper install python311-xyz, where xyz is the package
    you are trying to install.
    
[snip]

I tried OpenSuse Tumbleweed and Ubuntu 23.04. - on all of them pip install will fail with the above error message. Fedora does not yet implement PEP668, so that's why it is still working for you, but there's a proposal to integrate this as well. Arch based distros do seem to implement this already as well, as a quick Google search revealed.

You can still circumvent using pipx or a venv by passing the --break-system-packages flag to pip, but this probably scares people - as intended.

@boredsquirrel
Copy link
Author

hmm,would you mind adding the best simple solution, using a venv called "qgis" for example? Didnt know this was only working on Fedora

@frankbroniewski
Copy link
Contributor

Sure, I already made a PR https://github.com/qgis/QGIS-Website/pull/1225 for that, that got already accepted 🙂

I am a noob when it comes to venv, I always avoided them as unnecessary complication - that bites me in the back now 😁

I can only quote the message that comes up when I try to install a package via pip ... this basically just repeats the steps in my PR - just leaving out the python3.11 -m venv path/to/venv part, since I have no practical experience with it.

To install Python packages system-wide, try
zypper install python311-xyz, where xyz is the package
you are trying to install.

If you wish to install a non-rpm packaged Python package,
create a virtual environment using python3.11 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip.

If you wish to install a non-rpm packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Install pipx via zypper install python311-pipx .

Theoretically, practically you just need to create a working directory for your project and

  1. python -m venv ~/qgis
  2. cd ~/qgis
  3. source bin/activate
  4. pip install PACKAGE
  5. and use an editor with venv support

which seems quite a hassle to me. pipx works just like pip, it just does some magic behind the scenes - so I use that instead of virtual environments ...

@boredsquirrel
Copy link
Author

okay, @frankbroniewski didnt know how to rebase on your version and reapply my diffs, so I just copy-pasted your python instructions into my branch.

Should be ready to merge now.

@frankbroniewski
Copy link
Contributor

Hey, no worries, I struggle all the time with git when manual merging is required or something else out of the ordinary 😁

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

Successfully merging this pull request may close these issues.

4 participants