I’ve tried multiple time to get the Tools/environment_install/install-prereqs-ubuntu.sh -y script to install the necessary dependencies; however, I seem to get python related errors. I have Python 3.8 installed. I’m using Ubuntu under the Windows 10 WSL.
Python was previously installed through Windows. I wasn’t able to invoke python.exe via bash and tried to fix by using:
sudo apt-get install python-is-python3
then again: Tools/environment_install/install-prereqs-ubuntu.sh -y
from ardupilot directory. The script runs for a few seconds and ends with these errors/comments. I cannot get past this:
Package python-scipy is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
Package python-empy is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
Package python-pip is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
python3-pip
E: Package ‘python-pip’ has no installation candidate
E: Package ‘python-matplotlib’ has no installation candidate
E: Unable to locate package python-serial
E: Package ‘python-scipy’ has no installation candidate
E: Unable to locate package python-opencv
E: Package ‘python-empy’ has no installation candidate
jgiessel@DESKTOP-ISNCK32:~/ardupilot$
Please help, I’ve tried completely reinstalling Ubuntu, cloning ardupilot again… and same error with Python. Do I need Python 2.7 as well?
Thanks for help,
Zac G.
dpkg-query -l lsb-release
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
++±==============-=============-============-=============================================
ii lsb-release 11.1.0ubuntu2 all Linux Standard Base version reporting utility
read -r UBUNTU_CODENAME
++ lsb_release -c -s
‘[’ focal = precise ‘]’
‘[’ focal = trusty ‘]’
sudo usermod -a -G dialout jgiessel
dpkg-query -l modemmanager
dpkg-query: no packages found matching modemmanager
sudo apt-get --assume-yes update
Hit:1 Index of /ubuntu focal InRelease
Hit:2 Index of /ubuntu focal-updates InRelease
Get:3 Index of /ubuntu focal-security InRelease [114 kB]
Get:4 Index of /ubuntu focal-backports InRelease [108 kB]
Fetched 222 kB in 2s (113 kB/s)
Reading package lists… Done
apt-cache search python-wxgtk3.0
grep wx
python-wxgtk3.0 - Python interface to the wxWidgets Cross-platform C++ GUI toolkit
python-wxgtk3.0-dev - Development files for wxPython
sudo apt-get --assume-yes install build-essential ccache g++ gawk git make wget libtool libxml2-dev libxslt1-dev python-dev python-pip python-setuptools python-matplotlib python-serial python-scipy python-opencv python-numpy python-pyparsing xterm lcov gcovr python-wxgtk3.0 libtool-bin python-argparse openocd flex bison libncurses5-dev autoconf texinfo libftdi-dev zlib1g-dev zip genromfs python-empy cmake cmake-data libc6-i386 g+±arm-linux-gnueabihf pkg-config-arm-linux-gnueabihf
Reading package lists… Done
Building dependency tree
Reading state information… Done
Note, selecting ‘python-dev-is-python2’ instead of ‘python-dev’
Note, selecting ‘libpython2.7-stdlib’ instead of ‘python-argparse’
Package python-matplotlib is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
Package python-scipy is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
Package python-empy is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
Package python-pip is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
python3-pip
E: Package ‘python-pip’ has no installation candidate
E: Package ‘python-matplotlib’ has no installation candidate
E: Unable to locate package python-serial
E: Package ‘python-scipy’ has no installation candidate
E: Unable to locate package python-opencv
E: Package ‘python-empy’ has no installation candidate
jgiessel@DESKTOP-ISNCK32:~/ardupilot$ python -V
Python 3.8.10
jgiessel@DESKTOP-ISNCK32:~/ardupilot$
OK.
Might have been a long time ago last I check .
Does sudo apt-get update work and without any errors?
Just checking this because sometimes the Win10 firewall might block the traffic.
Might be a good idea to send the entire output for debugging.
Hello,
I ran into an issue after the sudo python2 get-pip.py
command.
final error is here:
jgiessel@DESKTOP-ISNCK32:~$ sudo python2 get-pip.py
ERROR: This script does not work on Python 2.7 The minimum supported Python version is 3.7. Please use https://bootstrap.pypa.io/pip/2.7/get-pip.py instead.
jgiessel@DESKTOP-ISNCK32:~$
That would be because the ArduSub-stable branch has not had the install script updated since…2019. And you are using a distro that was release in 2020 and we updated the install script in ArduPilot master. The install script would work with Ubuntu 20.04 and ArduSub-beta.
@jaxxzer What would you recommend in this case? Back porting the install script changes for the distro detection wouldn’t be too bad. Would the beta tag be an ok option to use?
Ok, I completely deleted the /ardupilot directory from my system.
Then per Ardupilot instructions: created a fork of the main Ardupilot repository and my GitHub account and cloned the fork.
The Tools/environment_install/install-prereqs-ubuntu.sh -y script works now ye!
A question remains: Is the latest stable version of ArduSub included in the main Ardupilot repository or should I follow the instructions from Ardusub:
This conversation has been continued on the ArduSub forum:
EDIT: The ArduSub-stable tag has been properly updated now, to match the Sub-4.0 branch.
@TunaLobster FYI you’ll have more luck tagging @williangalvani for ArduSub stuff now - Jacob has changed focus, and Willian is now doing most of the ArduSub maintenance/development.