feat: update installation scripts to pre-install fastapi and starlette for compatibility

This commit is contained in:
Даниил Грабарь
2026-06-15 15:24:19 +03:00
parent c540733ace
commit 7ff5616870
3 changed files with 16 additions and 7 deletions
+7 -3
View File
@@ -68,9 +68,13 @@ if ! sudo grep -qs 'break-system-packages' /root/.config/pip/pip.conf 2>/dev/nul
fi fi
# rosdep calls `pip install -U <pkg>` which upgrades every transitive dependency, # rosdep calls `pip install -U <pkg>` which upgrades every transitive dependency,
# including packages installed by apt that have no pip RECORD file, causing an # including packages installed by apt that have no pip RECORD file, causing an
# uninstall failure. Pre-installing fastmcp with --ignore-installed creates pip # uninstall failure. Pre-installing these packages with --ignore-installed creates
# RECORD files for all its transitive deps so the later rosdep upgrade succeeds. # pip RECORD files for all their transitive deps so the later rosdep upgrade succeeds.
sudo pip3 install --break-system-packages --ignore-installed fastmcp # fastapi>=0.100.0 + starlette>=0.27.0 are pinned together to avoid the
# "Router.__init__() got an unexpected keyword argument 'on_startup'" error that
# occurs when the apt-installed fastapi (old) is mixed with a newer pip starlette.
sudo pip3 install --break-system-packages --ignore-installed \
"fastapi>=0.100.0" "starlette>=0.27.0" fastmcp
PROGRESS 100 "Done" PROGRESS 100 "Done"
echo "ROS2 Jazzy Desktop installed successfully." echo "ROS2 Jazzy Desktop installed successfully."
+7 -3
View File
@@ -68,9 +68,13 @@ if ! sudo grep -qs 'break-system-packages' /root/.config/pip/pip.conf 2>/dev/nul
fi fi
# rosdep calls `pip install -U <pkg>` which upgrades every transitive dependency, # rosdep calls `pip install -U <pkg>` which upgrades every transitive dependency,
# including packages installed by apt that have no pip RECORD file, causing an # including packages installed by apt that have no pip RECORD file, causing an
# uninstall failure. Pre-installing fastmcp with --ignore-installed creates pip # uninstall failure. Pre-installing these packages with --ignore-installed creates
# RECORD files for all its transitive deps so the later rosdep upgrade succeeds. # pip RECORD files for all their transitive deps so the later rosdep upgrade succeeds.
sudo pip3 install --break-system-packages --ignore-installed fastmcp # fastapi>=0.100.0 + starlette>=0.27.0 are pinned together to avoid the
# "Router.__init__() got an unexpected keyword argument 'on_startup'" error that
# occurs when the apt-installed fastapi (old) is mixed with a newer pip starlette.
sudo pip3 install --break-system-packages --ignore-installed \
"fastapi>=0.100.0" "starlette>=0.27.0" fastmcp
PROGRESS 100 "Done" PROGRESS 100 "Done"
echo "ROS2 Jazzy (ros-base) installed successfully." echo "ROS2 Jazzy (ros-base) installed successfully."
+2 -1
View File
@@ -13,7 +13,8 @@ setup(
], ],
install_requires=[ install_requires=[
'setuptools', 'setuptools',
'fastapi', 'fastapi>=0.100.0',
'starlette>=0.27.0',
'uvicorn[standard]', 'uvicorn[standard]',
'python-multipart', 'python-multipart',
'fastmcp', 'fastmcp',