As explained on [https://docs.python.org/3/tutorial/venv.html python3 12. Virtual Environments and Packages] tutorial it is better to ''"create a virtual environment, a self-contained directory tree that contains a Python installation for a particular version of Python, plus a number of additional packages"''
This avoids the problem related to Applications that sometimes need a specific version of a library. In this way it is possible to install the required packages (with their specific version required) only in this ''virtual environment'' (which may differ from the ''root'' installation).
* for example, create the <code>virtual environment</code> named '''desk'''
</pre>
In this way it is possible to install the required packages (with their specific version required) only in this ''virtual environment'' (which may differ from the ''root'' installation).After pip3 installation, the available (base) packages are* <code>setuptools</code> can be upgraded too:
<pre class="board-terminal">
(desk-env) root@desk-mx6ul-lynx:~# pip3 listPackage Version---------- ------install --upgrade setuptoolsRequirement already satisfied: setuptools in ./desk-env/lib/python3.9/site-packages (49.2.1)Collecting setuptools Using cached setuptools-60.5.0-py3-none-any.whl (958 kB)Installing collected packages: setuptools Attempting uninstall: setuptoolsbtrfsutil 5 Found existing installation: setuptools 49.102.1gpg Uninstalling setuptools-49.2.1: Successfully uninstalled setuptools-49.152.1-unknowniniparse 0WARNING: Value for scheme.platlib does not match. Please report this to <https://github.4com/pypa/pip/issues/10151>libcomps 0distutils: /home/root/desk-env/lib/python3.19/site-packages sysconfig: /usr/lib/python3.159/site-packagespip 21 WARNING: Value for scheme.purelib does not match.3Please report this to <https://github.1com/pypa/pip/issues/10151>PyGObject 3 distutils: /home/root/desk-env/lib/python3.389/site-packages sysconfig: /usr/lib/python3.09/site-packages WARNING: Additional context: user = False home = None root = None prefix = NoneSuccessfully installed setuptools -60.5.0six 1.15.0wheel 0.37.1(desk-env) root@desk-mx6ul-lynx:~#
Building wheels for collected packages: MarkupSafe
Building wheel for MarkupSafe (setup.py) ... done
Created wheel for MarkupSafe: filename=MarkupSafe-2.0.1-cp39-cp39-linux_armv7l.whl size=25720 sha256=4fa273af41ed51d0614beb76603162148fd15472aa0eb8c1c28a9c18ed137031
Stored in directory: /home/root/.cache/pip/wheels/9f/6d/c8/1f59b07cf85ae842908006ec28f4477f7e4578df72c3eb0e46
WARNING: Value for scheme.platlib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
Collecting scapy
Downloading scapy-2.4.5.tar.gz (1.1 MB)
|#########████████████████████████████████| 1.1 MB 1.3 4 MB/s Preparing metadata (setup.py) ... - \ doneUsing legacy 'Building wheels for collected packages: scapy Building wheel for scapy (setup.py install' ) ... done Created wheel for scapy, since package 'wheel' is not installed: filename=scapy-2.4.5-py2.py3-none-any.whl size=1261555 sha256=df65309a4f5e0ee8e9f5da16f5b22b41c5a3d0ab03d671f788451874deeca183 Stored in directory: /home/root/.cache/pip/wheels/c8/9b/2f/012f0dbaf869afac8be52d4423f34eaa0b6c5c2d1292e40ebdSuccessfully built scapy
Installing collected packages: scapy
WARNING: Value for scheme.platlib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>