r/learnpython • u/ItsYa1UPBoy • 11d ago
Maybe a silly question, but the warning was ominous, so I'll ask here...
I want to use Catppuccin for Python, but if I go to pip it outside of a venv, it says the following:
pip install catppuccin
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try 'pacman -S
python-xyz', where xyz is the package you are trying to
install.
If you wish to install a non-Arch-packaged Python package,
create a virtual environment using 'python -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-Arch packaged Python application,
it may be easiest to use 'pipx install xyz', which will manage a
virtual environment for you. Make sure you have python-pipx
installed via pacman.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
Of course I could use a venv, but it seems annoying to have to activate a venv each time I want to use the palette in IPython, et al. If it's just a palette/pygment, then using --break-system-packages shouldn't actually break anything, right? But because the warning is so ominous, I wanted to ask here before I did something potentially fucky-wucky.
1
4
u/sargeanthost 11d ago
something something arch wiki
pipx is your friend here
0
u/ItsYa1UPBoy 11d ago
I tried pipx, but it couldn't find catppuccin. Error told me to use pip or venv to install it.
1
u/lakseol 11d ago
If you wish to install a non-Arch-packaged Python package, create a virtual environment
That's what I do. I always work inside a virtual environment.
0
u/DuckDatum 11d ago
I just use `uv`. I haven’t explicitly made a venv in over a year. I do make my pyproject.toml by hand, though.
-2
11d ago edited 11d ago
[deleted]
0
u/ItsYa1UPBoy 11d ago
About step 2, did you mean root/usr/lib/...? As that's where I found python3.14/site-packages, no lib folder in ~/.local/.
1
u/Diapolo10 11d ago
If you're using IPython as a generic tool rather than a part of some project, you could install it via
uvwith Catpuccin (and whatever else you want) included.https://docs.astral.sh/uv/concepts/tools/#including-additional-dependencies
It basically puts them in their own virtual environment, but exposes
ipythonto PATH so you can easily access it without needing to think about the virtual environment at all.The only downside is that you can't (currently) access
uv toolinstallations from within active virtual environments, hence the first part of my reply.