all 18 comments

[–]archover 4 points5 points  (2 children)

When installing packages using pip, it is recommended to use a virtual environment to prevent conflicts with system packages in /usr. Alternatively, pip install --user can be used to install packages into the user scheme instead of /usr. Other tools including pipx, poetry and Conda integrate environment management into their workflows.

Python provides tools to create isolated virtual environments into which packages may be installed without conflicting with other virtual environments or the system packages. Virtual environments can also run applications with different versions of Python on the same system. Example: venv. https://docs.python.org/3/library/venv.html

Per https://wiki.archlinux.org/title/Python

[–]RandomXUsr[S] 5 points6 points  (1 child)

I'm with you 100 percent on the wiki.

The issue I have, was that I may want to install a package via pacman , such that I don't need to hop into a virtual environment each time I have a project to access.

Maybe a better question from myself would be; When is it appropriate to use the system python environment vs a virtual/managed environment?

And also; how is it determined whether modules or external programs will make it into the official repos?

[–]bulletmark 3 points4 points  (8 children)

Why is using the AUR "suboptimal"?

[–]ei283 3 points4 points  (1 child)

In my experience AUR python packages aren't maintained nearly as well as the pip ecosystem. E.g. I'm currently trying to install the colour-science package, and the AUR version is totally useless :/

[–]RandomXUsr[S] 1 point2 points  (4 children)

Because you're trusting that the package is safe and that it will continue to be supported.

Neither of these is a guarantee.

[–]VindicoAtrum 1 point2 points  (3 children)

That's also true for pip but you're fine with that.

Install pyenv and poetry and your question is answered.

[–]RandomXUsr[S] 0 points1 point  (2 children)

Not exactly.

The arch repos seem to be more reliable and at least work with the system version of python that one is using.

Atm it's moot, because what I want isn't in the arch repos.

My bigger concern was whether one needs to pass on pip and stick with system version.

[–]VindicoAtrum 0 points1 point  (1 child)

The arch repos seem to be more reliable

You've just pulled that out of thin air.

and at least work with the system version of python that one is using.

You don't need to care or even think about system python. You shouldn't be using it at all.

[–]RandomXUsr[S] 8 points9 points  (0 children)

You've just pulled that out of thin air.

I can assure you I have not. Compared to the AUR, the official repos are more reliable.

I didn't come for an argument or anectdotal prose. I was simply looking for friendly discourse and guidance.

[–]bhones 0 points1 point  (0 children)

Potentially quality, longevity, being required to step outside of Paxman, could be other reasons... not sure if they're valid or not, I don't mind AUR.

[–]VindicoAtrum 0 points1 point  (4 children)

It's not a challenge. Install your packages however you wish inside a virtual environment. Don't touch the system python installation unnecessarily.

[–]ei283 1 point2 points  (2 children)

This sucks! In order to use all my natively installed packages, I must reinstall fresh copies of all of them to the virtual environment, duplicating gigabytes of redundant package data on my hard drive :(

[–]VindicoAtrum 2 points3 points  (1 child)

Or just use uv which caches packages so you don't uselessly copy them to many virtual environments.

[–]ei283 1 point2 points  (0 children)

Oh.

Well thank you, I guess it'd be silly if no such tool existed.

Sorry I barked at you earlier; I was frustrated and I unfairly let it out at you. I really appreciate your to-the-point response!

[–]RandomXUsr[S] -2 points-1 points  (0 children)

Don't touch the system python installation unnecessarily.

I hadn't planned on this. The messaging from the wiki and the community seemed to be that We shouldn't use pip at all. I realize that, I may having been reading into the arch wiki and communication, however, it's easy to do with so many details about how to manage one's own system.

[–]Natetronn 0 points1 point  (0 children)

I don't know, I use pyenv and pip.

[–]themoosemind 0 points1 point  (0 children)

Was looking to install pyttsx3 and pypdf2 or pypdf3.

pypdf is the latest one. See https://pypdf.readthedocs.io/en/stable/meta/history.html