admin管理员组文章数量:1390880
Someone made a post asking how to fix this error...:
error: externally-managed-environment
This environment is externally managed To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install.
If you wish to install a non-Debian-packaged Python package, create a virtual environment using python3 -m venv path/to/venv. Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application, it may be easiest to use pipx install xyz, which will manage a virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
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.
...in the past, and the suggestion from the top answer was that python libraries/applications are supposed to be installed in virtual environments whenever possible. While this is fine and dandy in the vast majority of situations, I am trying to install a tiling window manager called Qtile onto my Debian system. Since this sort of software generally requires root access to the system to function properly, is installing it in a separate environment really a good idea in this case? It does not sound like it. I am aware of other solutions like --break system-packages as the error itself mentions, but I really do not feel like causing issues with my system breaking if I can help it. What is the best course of action to take here?
What I tried First
First I tried following the installation documentation on the Qtile webstie:
Installing on Ubuntu or Debian 11 (bullseye) or greater
Ubuntu and Debian >=11 comes with the necessary packages for installing Qtile. Starting from a minimal Debian installation, the following packages are required:
sudo apt install xserver-x xinit
sudo apt install libpangocairo-1.0-0
sudo apt install python3-pip python3-xcffib python3-cairocffi
Either Qtile can then be downloaded from the package index or the Github repository can be used, see Installing From Source:
pip install qtile
But then I got the aforementioned error
本文标签:
版权声明:本文标题:pip - Is installing a python-based window manager such as Qtile in it's own local environment a bad idea? - Stack Overfl 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744639294a2617021.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论