Guest User

python-ubuntu

a guest
Jan 4th, 2026
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.94 KB | Source Code | 0 0
  1. dustin@dustin-ThinkCentre-M900:~$ sudo pip install notify2
  2. [sudo] password for dustin:
  3. error: externally-managed-environment
  4.  
  5. × This environment is externally managed
  6. ╰─> To install Python packages system-wide, try apt install
  7.     python3-xyz, where xyz is the package you are trying to
  8.     install.
  9.    
  10.     If you wish to install a non-Debian-packaged Python package,
  11.     create a virtual environment using python3 -m venv path/to/venv.
  12.     Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
  13.     sure you have python3-full installed.
  14.    
  15.     If you wish to install a non-Debian packaged Python application,
  16.     it may be easiest to use pipx install xyz, which will manage a
  17.     virtual environment for you. Make sure you have pipx installed.
  18.    
  19.     See /usr/share/doc/python3.12/README.venv for more information.
  20.  
  21. 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.
  22. hint: See PEP 668 for the detailed specification.
  23. dustin@dustin-ThinkCentre-M900:~$ apt install pipx
  24. E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
  25. E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
  26. dustin@dustin-ThinkCentre-M900:~$ sudo apt installl pipx
  27. E: Invalid operation installl
  28. dustin@dustin-ThinkCentre-M900:~$ sudo apt install pipx
  29. Reading package lists... Done
  30. Building dependency tree... Done
  31. Reading state information... Done
  32. pipx is already the newest version (1.4.3-1).
  33. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  34. dustin@dustin-ThinkCentre-M900:~$ pipx install notify2
  35.  
  36. No apps associated with package notify2 or its dependencies. If you are
  37. attempting to install a library, pipx should not be used. Consider using pip
  38. or a similar tool instead.
  39. dustin@dustin-ThinkCentre-M900:~$ python -m venv my-venv
  40. Command 'python' not found, did you mean:
  41.   command 'python3' from deb python3
  42.   command 'python' from deb python-is-python3
  43. dustin@dustin-ThinkCentre-M900:~$ python3 -m venv my-venv
  44. dustin@dustin-ThinkCentre-M900:~$ my-venv/bin/pip install notify2
  45. Collecting notify2
  46.   Using cached notify2-0.3.1-py2.py3-none-any.whl.metadata (2.2 kB)
  47. Using cached notify2-0.3.1-py2.py3-none-any.whl (8.0 kB)
  48. Installing collected packages: notify2
  49. Successfully installed notify2-0.3.1
  50. dustin@dustin-ThinkCentre-M900:~$ source my-venv/activate/bin
  51. bash: my-venv/activate/bin: No such file or directory
  52. dustin@dustin-ThinkCentre-M900:~$ python3 dustin/notif.py
  53. python3: can't open file '/home/dustin/dustin/notif.py': [Errno 2] No such file or directory
  54. dustin@dustin-ThinkCentre-M900:~$ python3 notif.py
  55. Traceback (most recent call last):
  56.  File "/home/dustin/notif.py", line 4, in <module>
  57.    import notify2
  58. ModuleNotFoundError: No module named 'notify2'
  59. dustin@dustin-ThinkCentre-M900:~$
  60.  
Advertisement
Add Comment
Please, Sign In to add comment