79227982

Date: 2024-11-26 19:18:28
Score: 1
Natty:
Report link

LuxGiammi's answer is correct with good advise.

RE: how to accurately install Python packages? Should I use pip, pacman or yay?

(1) User or Virtual Environment: Great for development.

There is a dozen virtual environment managers available.

I recommend pyenv:

Example:

# Install pyenv and install desired Python version directly into user directory:
$ pacman -S pyenv
$ pyenv install 3.12 # Builds Python version specified

# Select which python version or environment you would like to use:
$ pyenv [local|global] 3.12 

# (Optional) Point pycharm to your environment. e.g. ~/.pyenv/versions/3.12/bin/python
# (Optional) Create virtualenvs

(2) System-Wide: Arguably a more accurate method. Clean, distributable.

Installed with pacman or an AUR helper such as yay. Easy and great if your project already has packages.

RE: Is it necessary to add the python- prefix?

Recommended and you should, but not required.

Reasons:
  • RegEx Blacklisted phrase (1.5): fix?
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: mathewguest