Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
gentoo:pip [2024/02/23 14:48] – created willy | gentoo:pip [2025/03/13 13:26] (current) – [PIP] willy | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== PIP ====== | + | ====== |
[[https:// | [[https:// | ||
Line 27: | Line 27: | ||
and that's it! Now **pip** and specifically **pip install** will work just fine for your user. **Do not do this for user root**. | and that's it! Now **pip** and specifically **pip install** will work just fine for your user. **Do not do this for user root**. | ||
+ | ===== Virtual Environments ==== | ||
+ | |||
+ | V'envs are pretty common using PIP, to create a venv with your user type: | ||
+ | <code bash> | ||
+ | su - user | ||
+ | python -m venv my_venv | ||
+ | | ||
+ | </ | ||
+ | |||
+ | You might want to put at the end of your **~/ | ||
+ | <code bash> | ||
+ | source ~/ | ||
+ | </ | ||
+ | for automatic loading of venv variables. | ||
+ | |||
+ | Also, PIP will most probably require you to modify your venv setting. Open **~/ | ||
+ | < | ||
+ | include-system-site-packages = true | ||
+ | </ | ||
+ | |||
+ | And, last, you most probably **want** to add ~/ | ||
+ | <code bash> | ||
+ | export PATH=$PATH: | ||
+ | </ | ||
+ | |||
+ | ===== OpenRC and venv ===== | ||
+ | |||
+ | You don't really need to ativate the venv. You can run the full path to the executable under the **bin** folder of the venv while being in the root folder of the venv, as your CWD. | ||
+ | |||
+ | So: | ||
+ | < | ||
+ | # | ||
+ | # Copyright 2025 Gentoo Authors | ||
+ | # Distributed under the terms of the GNU General Public License v2 | ||
+ | |||
+ | name=" | ||
+ | description=" | ||
+ | pidfile="/ | ||
+ | command_background=true | ||
+ | command="/ | ||
+ | command_args=" | ||
+ | command_user=" | ||
+ | |||
+ | start_pre() { | ||
+ | cd / | ||
+ | } | ||
+ | </ |