Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip on Arch #5

Open
venomousZealot opened this issue May 2, 2020 · 2 comments
Open

pip on Arch #5

venomousZealot opened this issue May 2, 2020 · 2 comments

Comments

@venomousZealot
Copy link

I just spent the evening learning about "pip" and I am not happy.

To my fellow arch users, please do NOT use pip system-wide. There is also no need to install pip as a package. The pip command becomes available once you activate a virtual python environment.

Quote from ArchWiki:

If you must use pip, use a virtual environment, or pip install --user to avoid conflicts with packages in /usr.

I'm no expert, but here is how I got the pip dependencies to work:

python -m venv upp_venv
source upp_venv/bin/activate
pip install upp
deactivate

Then launch powerupp with a custom path.

PATH="$HOME/upp_venv/bin:$PATH" powerupp

I haven't yet given the udev rule a thought.

@azeam
Copy link
Owner

azeam commented May 2, 2020

I have no experience with Python virtual environemnt but pip install --user is probably a better option in this case (and I should change the readme...). Powerupp checks PATH for upp and also the directory ~/.local/bin (which is not in PATH on some systems but (sometimes) used by pip) and temporarily adds it to PATH if necessary, and sets up the udev rule accordingly. If the virtual environment is not available at system start that is of course harder to work around.

@sibradzic
Copy link
Collaborator

There is nothing wrong with pip, but of course one should be careful not to mess up the distro package files in root mode. To use upp deployed in --user mode with sudo, provided that the ~/.local/bin is in path, try:
sudo -E env "PATH=$PATH" upp --help

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

No branches or pull requests

3 participants