Skip to content

Commit

Permalink
Tools: use python3 -m pip to install Python packages
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Jan 28, 2025
1 parent d7be789 commit 6a9d3f9
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions Tools/AP_Periph/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import sys
try:
import em
except ImportError:
print("you need to install empy with 'python -m pip install empy==3.3.4'")
print("you need to install empy with 'python3 -m pip install empy==3.3.4'")
sys.exit(1)

try:
import pexpect
except ImportError:
print("you need to install pexpect with 'python -m pip install pexpect'")
print("you need to install pexpect with 'python3 -m pip install pexpect'")
sys.exit(1)


Expand Down
2 changes: 1 addition & 1 deletion Tools/environment_install/install-prereqs-arch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ else
echo "Please use \`$SOURCE_LINE\` to activate the ArduPilot venv"
fi

pip3 -q install -U $PYTHON_PKGS
python3 -m pip -q install -U $PYTHON_PKGS

(
cd /usr/lib/ccache
Expand Down
2 changes: 1 addition & 1 deletion Tools/environment_install/install-prereqs-mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
brew update
brew install --force --overwrite gawk coreutils wget

PIP=pip
PIP="python3 -m pip"
if maybe_prompt_user "Install python using pyenv [N/y]?" ; then
echo "Checking pyenv..."
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ ZYPPER="sudo zypper in --no-recommends"
if $ASSUME_YES; then
ZYPPER="sudo zypper in -y --no-recommends"
fi
PIP3=pip3
PIP3="python3 -m pip"
if $QUIET; then
PIP3="pip3 -q"
PIP3="$PIP3 -q"
fi

function package_is_installed() {
Expand Down
2 changes: 1 addition & 1 deletion Tools/ros2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ install MAVProxy if it is not available on the container.


```bash
pip install -U MAVProxy
python3 -m pip install -U MAVProxy
```


Expand Down
10 changes: 5 additions & 5 deletions Tools/scripts/configure-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ fi

. ~/.profile

python -m pip install --progress-bar off --user -U argparse pyserial pexpect future lxml
python -m pip install --progress-bar off --user -U intelhex
python -m pip install --progress-bar off --user -U numpy
python -m pip install --progress-bar off --user -U edn_format
python -m pip install --progress-bar off --user -U empy==3.3.4
python3 -m pip install --progress-bar off --user -U argparse pyserial pexpect future lxml
python3 -m pip install --progress-bar off --user -U intelhex
python3 -m pip install --progress-bar off --user -U numpy
python3 -m pip install --progress-bar off --user -U edn_format
python3 -m pip install --progress-bar off --user -U empy==3.3.4
6 changes: 3 additions & 3 deletions Tools/scripts/esp32_get_idf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ git submodule update --init --recursive

echo
echo "installing missing python modules"
python -m pip install empy==3.3.4
python -m pip install pexpect
python -m pip install future
python3 -m pip install empy==3.3.4
python3 -m pip install pexpect
python3 -m pip install future

cd ../..

Expand Down
2 changes: 1 addition & 1 deletion Tools/scripts/size_compare_branches.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
to create a html report comparing an ArduPilot build across two
branches
pip3 install --user elf_diff weasyprint
python3 -m pip install --user elf_diff weasyprint
AP_FLAKE8_CLEAN
Expand Down

0 comments on commit 6a9d3f9

Please sign in to comment.