fix(#301): use python3 -m pip instead of bare pip3 in setup.sh
Bare `pip3` can point to a different Python installation than `python3`. On the reporter's macOS, python3 was 3.14 but pip3 was linked to 3.9, causing "no matching distribution" since skill-seekers requires >=3.10. Using `python3 -m pip` guarantees the same interpreter that passed the version check is the one performing the install. Closes #301 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
13
setup.sh
13
setup.sh
@@ -65,15 +65,16 @@ echo ""
|
|||||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||||
echo "Installing skill-seekers..."
|
echo "Installing skill-seekers..."
|
||||||
|
|
||||||
# Try pip3 install first
|
# Use python3 -m pip to ensure pip matches the python3 that passed the
|
||||||
if pip3 install skill-seekers 2>/dev/null; then
|
# version check. Bare 'pip3' can point to a different Python installation.
|
||||||
echo -e "${GREEN}✓${NC} Installed successfully via pip3"
|
if python3 -m pip install skill-seekers 2>/dev/null; then
|
||||||
|
echo -e "${GREEN}✓${NC} Installed successfully via python3 -m pip"
|
||||||
else
|
else
|
||||||
# Fallback to pip3 with --break-system-packages (for system Python)
|
# Fallback with --break-system-packages (for system Python)
|
||||||
echo "Standard install failed, trying with --break-system-packages..."
|
echo "Standard install failed, trying with --break-system-packages..."
|
||||||
pip3 install skill-seekers --break-system-packages || {
|
python3 -m pip install skill-seekers --break-system-packages || {
|
||||||
echo -e "${RED}❌ Failed to install skill-seekers${NC}"
|
echo -e "${RED}❌ Failed to install skill-seekers${NC}"
|
||||||
echo "Try manually: pip3 install skill-seekers"
|
echo "Try manually: python3 -m pip install skill-seekers"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
echo -e "${GREEN}✓${NC} Installed successfully with --break-system-packages"
|
echo -e "${GREEN}✓${NC} Installed successfully with --break-system-packages"
|
||||||
|
|||||||
Reference in New Issue
Block a user