Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dustin@dustin-ThinkCentre-M900:~$ sudo pip install notify2
- [sudo] password for dustin:
- 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.12/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.
- dustin@dustin-ThinkCentre-M900:~$ apt install pipx
- E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
- E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
- dustin@dustin-ThinkCentre-M900:~$ sudo apt installl pipx
- E: Invalid operation installl
- dustin@dustin-ThinkCentre-M900:~$ sudo apt install pipx
- Reading package lists... Done
- Building dependency tree... Done
- Reading state information... Done
- pipx is already the newest version (1.4.3-1).
- 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
- dustin@dustin-ThinkCentre-M900:~$ pipx install notify2
- No apps associated with package notify2 or its dependencies. If you are
- attempting to install a library, pipx should not be used. Consider using pip
- or a similar tool instead.
- dustin@dustin-ThinkCentre-M900:~$ python -m venv my-venv
- Command 'python' not found, did you mean:
- command 'python3' from deb python3
- command 'python' from deb python-is-python3
- dustin@dustin-ThinkCentre-M900:~$ python3 -m venv my-venv
- dustin@dustin-ThinkCentre-M900:~$ my-venv/bin/pip install notify2
- Collecting notify2
- Using cached notify2-0.3.1-py2.py3-none-any.whl.metadata (2.2 kB)
- Using cached notify2-0.3.1-py2.py3-none-any.whl (8.0 kB)
- Installing collected packages: notify2
- Successfully installed notify2-0.3.1
- dustin@dustin-ThinkCentre-M900:~$ source my-venv/activate/bin
- bash: my-venv/activate/bin: No such file or directory
- dustin@dustin-ThinkCentre-M900:~$ python3 dustin/notif.py
- python3: can't open file '/home/dustin/dustin/notif.py': [Errno 2] No such file or directory
- dustin@dustin-ThinkCentre-M900:~$ python3 notif.py
- Traceback (most recent call last):
- File "/home/dustin/notif.py", line 4, in <module>
- import notify2
- ModuleNotFoundError: No module named 'notify2'
- dustin@dustin-ThinkCentre-M900:~$
Advertisement
Add Comment
Please, Sign In to add comment