61 lines
2.7 KiB
Markdown
61 lines
2.7 KiB
Markdown
# Orange
|
||
Why "Orange"? It's a fruit with a pip. The name doesn't matter as long as it doesn't conflict with another pacakge, and you can symlink it.
|
||
```
|
||
oscarg@ws01:~$ orange
|
||
orange: command not found
|
||
oscarg@ws01:~$ sudo apt install orange
|
||
[sudo] password for oscarg:
|
||
Error: Unable to locate package orange
|
||
oscarg@ws01:~$
|
||
```
|
||
I do not see `orange` here, so `orange` it is.
|
||
|
||
---
|
||
## What's this?
|
||
A small stub thing for Debian-based Linux distributions that simply redirects your `pip` instruction to `apt`. Really, that's all it does.
|
||
Look, see? Here, it works, symlinked as `pip`.
|
||
```
|
||
oscarg@ws01:~$ pip requests
|
||
Preparing to install the following packages:
|
||
- python3-requests
|
||
|
||
Would you like to proceed with apt (y/n): y
|
||
[sudo] password for oscarg:
|
||
python3-requests is already the newest version (2.32.3+dfsg-4ubuntu1.1).
|
||
The following packages were automatically installed and are no longer required:
|
||
bogofilter evolution-ews-core libclutter-1.0-common libcogl-path20 libgnome-autoar-gtk-0-0 libgspell-1-common
|
||
bogofilter-bdb libchamplain-0.12-0 libclutter-gtk-1.0-0 libcogl20 libgsl28 libpst4t64
|
||
bogofilter-common libchamplain-gtk-0.12-0 libcogl-common libevolution libgslcblas0 libytnef0
|
||
evolution-common libclutter-1.0-0 libcogl-pango20 libgail-3-0t64 libgspell-1-3
|
||
Use 'sudo apt autoremove' to remove them.
|
||
|
||
Summary:
|
||
Upgrading: 0, Installing: 0, Removing: 0, Not Upgrading: 53
|
||
Packages installed successfully.
|
||
oscarg@ws01:~$
|
||
```
|
||
Ignore the fact I forgot to add instructions like `install`, `update`, or `remove`. I haven't used `pip` in a while, okay?
|
||
## Why?
|
||
```
|
||
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.13/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.
|
||
```
|
||
I believe this was a mistake. |