Skip to content

Commit 9f7b7ef

Browse files
committed
Use uv instead of pip if available
1 parent 119cadc commit 9f7b7ef

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

setup.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ function check_installed_python() {
3232
if [ $? -eq 0 ]; then
3333
echo "using ${PYTHON}"
3434
check_installed_pip
35+
PIP="${PYTHON} -m pip"
36+
if [ -x "$(command -v uv)" ]; then
37+
echo "uv detected — using it instead of pip for faster installation."
38+
PIP="uv pip"
39+
fi
3540
return
3641
fi
3742
done
@@ -49,7 +54,7 @@ function updateenv() {
4954
source .venv/bin/activate
5055
SYS_ARCH=$(uname -m)
5156
echo "pip install in-progress. Please wait..."
52-
${PYTHON} -m pip install --upgrade pip wheel setuptools uv
57+
${PIP} install --upgrade pip wheel setuptools
5358
REQUIREMENTS_HYPEROPT=""
5459
REQUIREMENTS_PLOT=""
5560
REQUIREMENTS_FREQAI=""
@@ -92,12 +97,12 @@ function updateenv() {
9297
fi
9398
fi
9499

95-
${PYTHON} -m uv pip install --upgrade -r ${REQUIREMENTS} ${REQUIREMENTS_HYPEROPT} ${REQUIREMENTS_PLOT} ${REQUIREMENTS_FREQAI} ${REQUIREMENTS_FREQAI_RL}
100+
${PIP} install --upgrade -r ${REQUIREMENTS} ${REQUIREMENTS_HYPEROPT} ${REQUIREMENTS_PLOT} ${REQUIREMENTS_FREQAI} ${REQUIREMENTS_FREQAI_RL}
96101
if [ $? -ne 0 ]; then
97102
echo "Failed installing dependencies"
98103
exit 1
99104
fi
100-
${PYTHON} -m uv pip install -e .
105+
${PIP} install -e .
101106
if [ $? -ne 0 ]; then
102107
echo "Failed installing Freqtrade"
103108
exit 1
@@ -252,7 +257,7 @@ function install() {
252257

253258
function plot() {
254259
echo_block "Installing dependencies for Plotting scripts"
255-
${PYTHON} -m uv pip install plotly --upgrade
260+
${PIP} install plotly --upgrade
256261
}
257262

258263
function help() {

0 commit comments

Comments
 (0)