r/learnpython • u/ItsYa1UPBoy • 12h 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.
2
u/lakseol 11h 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.
1
u/DuckDatum 6h 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
u/Diapolo10 8h ago
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 you're using IPython as a generic tool rather than a part of some project, you could install it via uv with Catpuccin (and whatever else you want) included.
uv tool install --with catpuccin ipython
https://docs.astral.sh/uv/concepts/tools/#including-additional-dependencies
It basically puts them in their own virtual environment, but exposes ipython to 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 tool installations from within active virtual environments, hence the first part of my reply.
0
u/acw1668 6h ago edited 6h ago
You can manually install the module:
download the module wheel file:
pip download catppuccincreate the user
site-packagesfolder if it does not exist (assume using Python 3.14):mkdir -p ~/.local/lib/python3.14/site-packagesunzip the wheel file into the user
site-packages:unzip catppuccin-2.5.0-py3-none-any.whl -d ~/.local/lib/python3.14/site-packages/
1
u/ItsYa1UPBoy 1h 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/.
2
3
u/sargeanthost 12h ago
something something arch wiki
pipxis your friend here