ardupilot_wiki
ardupilot_wiki copied to clipboard
Setup: Add venv for Ubuntu Noble (24.04 LTS)
This is an update to #5481 for LTS Noble.
Same ideas and problems being solved here.
@peterbarker @khancyr awaiting approvals
@peterbarker @khancyr awaiting approvals
... want to know the impact of --upgrade XYZZY on packages which are not XYZZY and have been pinned
╭─khancyr@MAN-LP-0101 /mnt/c/Documents and Settings/PierreKancir/Downloads/logs
╰─$ sudo pip install -U pymavlink==2.4.13
Requirement already satisfied: pymavlink==2.4.13 in /usr/local/lib/python3.10/dist-packages (2.4.13)
Requirement already satisfied: future in /usr/local/lib/python3.10/dist-packages (from pymavlink==2.4.13) (0.18.3)
Requirement already satisfied: lxml in /usr/lib/python3/dist-packages (from pymavlink==2.4.13) (4.8.0)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
╭─khancyr@MAN-LP-0101 /mnt/c/Documents and Settings/PierreKancir/Downloads/logs
╰─$ sudo pip install -U mavproxy
Collecting mavproxy
Using cached MAVProxy-1.8.71-py3-none-any.whl (7.2 MB)
Requirement already satisfied: pyserial>=3.0 in /usr/lib/python3/dist-packages (from mavproxy) (3.5)
Collecting pymavlink>=2.4.14
Using cached pymavlink-2.4.41-py3-none-any.whl (11.6 MB)
Requirement already satisfied: pynmeagps in /usr/local/lib/python3.10/dist-packages (from mavproxy) (1.0.39)
Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (from mavproxy) (1.21.5)
Requirement already satisfied: future in /usr/local/lib/python3.10/dist-packages (from pymavlink>=2.4.14->mavproxy) (0.18.3)
Requirement already satisfied: lxml in /usr/lib/python3/dist-packages (from pymavlink>=2.4.14->mavproxy) (4.8.0)
Installing collected packages: pymavlink, mavproxy
Attempting uninstall: pymavlink
Found existing installation: pymavlink 2.4.13
Uninstalling pymavlink-2.4.13:
Successfully uninstalled pymavlink-2.4.13
Successfully installed mavproxy-1.8.71 pymavlink-2.4.41
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Pining only works for the current cmdline, so any further pip install -U will remove the pining to satisfy the dependency.
If you try sudo pip install -U pymavlink==2.4.13 mavproxy it will look for the mavproxy version that is compatibles with the pinned pymavlink
╭─khancyr@MAN-LP-0101 /mnt/c/Documents and Settings/PierreKancir/Downloads/logs ╰─$ sudo pip install -U pymavlink==2.4.13 Requirement already satisfied: pymavlink==2.4.13 in /usr/local/lib/python3.10/dist-packages (2.4.13) Requirement already satisfied: future in /usr/local/lib/python3.10/dist-packages (from pymavlink==2.4.13) (0.18.3) Requirement already satisfied: lxml in /usr/lib/python3/dist-packages (from pymavlink==2.4.13) (4.8.0) WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv ╭─khancyr@MAN-LP-0101 /mnt/c/Documents and Settings/PierreKancir/Downloads/logs ╰─$ sudo pip install -U mavproxy Collecting mavproxy Using cached MAVProxy-1.8.71-py3-none-any.whl (7.2 MB) Requirement already satisfied: pyserial>=3.0 in /usr/lib/python3/dist-packages (from mavproxy) (3.5) Collecting pymavlink>=2.4.14 Using cached pymavlink-2.4.41-py3-none-any.whl (11.6 MB) Requirement already satisfied: pynmeagps in /usr/local/lib/python3.10/dist-packages (from mavproxy) (1.0.39) Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (from mavproxy) (1.21.5) Requirement already satisfied: future in /usr/local/lib/python3.10/dist-packages (from pymavlink>=2.4.14->mavproxy) (0.18.3) Requirement already satisfied: lxml in /usr/lib/python3/dist-packages (from pymavlink>=2.4.14->mavproxy) (4.8.0) Installing collected packages: pymavlink, mavproxy Attempting uninstall: pymavlink Found existing installation: pymavlink 2.4.13 Uninstalling pymavlink-2.4.13: Successfully uninstalled pymavlink-2.4.13 Successfully installed mavproxy-1.8.71 pymavlink-2.4.41 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venvPining only works for the current cmdline, so any further pip install -U will remove the pining to satisfy the dependency. If you try
sudo pip install -U pymavlink==2.4.13 mavproxyit will look for the mavproxy version that is compatibles with the pinned pymavlink
OK, thanks for checking.
I guess I have to withdraw my objections to the one-line thing, 'though it makes it a PITA to work out what the problems are. Could we at least use \ to separate the packages onto separate lines to make it easie to see them all at a glance?
This should be good as is. I think a better way would be to check if the year of the Ubuntu release is greater than 24. That would keep it working on the non-LTS releases too.