Compare commits
4 Commits
0aa1bb7069
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 21722c5c85 | |||
| ad4d71e0b6 | |||
| d7f7df49e7 | |||
| 9c42b38c4b |
29
build_pillow_local.sh
Executable file
29
build_pillow_local.sh
Executable file
@@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Build Pillow from source and place wheel in req_libraries_32bit
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "======================================="
|
||||||
|
echo " BUILD PILLOW FROM SOURCE (32-bit) "
|
||||||
|
echo "======================================="
|
||||||
|
|
||||||
|
# Ensure virtual environment is activated
|
||||||
|
echo "Activating .venv..."
|
||||||
|
source .venv/bin/activate
|
||||||
|
|
||||||
|
# Find Pillow source tar.gz
|
||||||
|
PILLOW_SRC=$(ls req_libraries_32bit/Pillow-*.tar.gz 2>/dev/null | head -1)
|
||||||
|
if [ -z "$PILLOW_SRC" ]; then
|
||||||
|
echo "❌ Pillow source distribution not found in req_libraries_32bit."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Building Pillow from source: $PILLOW_SRC"
|
||||||
|
pip wheel "$PILLOW_SRC" -w req_libraries_32bit
|
||||||
|
|
||||||
|
if ls req_libraries_32bit/pillow*.whl >/dev/null 2>&1; then
|
||||||
|
echo "✅ Pillow wheel built successfully!"
|
||||||
|
echo "You can now install it offline with ./install_32bit.sh."
|
||||||
|
else
|
||||||
|
echo "❌ Pillow wheel build failed. Check build dependencies."
|
||||||
|
fi
|
||||||
@@ -1,15 +1,89 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Download 32-bit ARM compatible libraries
|
# Download 32-bit ARM compatible libraries with forced architecture
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
echo "Downloading 32-bit ARM compatible packages..."
|
echo "======================================="
|
||||||
|
echo " 32-BIT ARM LIBRARY DOWNLOADER"
|
||||||
|
echo "======================================="
|
||||||
|
echo ""
|
||||||
|
|
||||||
# Create directory for 32-bit wheels
|
# Remove existing 32-bit folder to ensure clean download
|
||||||
|
if [ -d "req_libraries_32bit" ]; then
|
||||||
|
echo "🗑️ Removing existing req_libraries_32bit for clean download..."
|
||||||
|
rm -rf req_libraries_32bit
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create fresh directory
|
||||||
mkdir -p req_libraries_32bit
|
mkdir -p req_libraries_32bit
|
||||||
|
|
||||||
# Download with broader compatibility
|
echo "📦 Downloading 32-bit ARM compatible packages..."
|
||||||
pip download -r requirements.txt -d req_libraries_32bit/ --prefer-binary
|
echo " Target architecture: linux_armv7l"
|
||||||
|
echo ""
|
||||||
|
|
||||||
echo "Download completed!"
|
# Download with explicit 32-bit ARM platform targeting
|
||||||
echo "Files downloaded to req_libraries_32bit/"
|
|
||||||
|
echo "🔄 Downloading with forced 32-bit architecture (armv7l and armhf)..."
|
||||||
|
|
||||||
|
# Download for armv7l (wheels only)
|
||||||
|
pip download -r requirements.txt -d req_libraries_32bit/ \
|
||||||
|
--platform linux_armv7l \
|
||||||
|
--only-binary=:all: \
|
||||||
|
--python-version 311 \
|
||||||
|
--abi cp311 || true
|
||||||
|
# Download for armhf (wheels only)
|
||||||
|
pip download -r requirements.txt -d req_libraries_32bit/ \
|
||||||
|
--platform linux_armhf \
|
||||||
|
--only-binary=:all: \
|
||||||
|
--python-version 311 \
|
||||||
|
--abi cp311 || true
|
||||||
|
|
||||||
|
# Download Pillow as source if wheel is not available
|
||||||
|
echo "🔄 Downloading Pillow source distribution for local build..."
|
||||||
|
pip download Pillow -d req_libraries_32bit/ --no-binary=:all: || true
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "📊 Download results:"
|
||||||
|
WHEEL_COUNT=$(ls req_libraries_32bit/*.whl 2>/dev/null | wc -l || echo "0")
|
||||||
|
echo " Wheel files: $WHEEL_COUNT"
|
||||||
|
|
||||||
|
if [ "$WHEEL_COUNT" -gt 0 ]; then
|
||||||
|
echo ""
|
||||||
|
echo "🔍 Key 32-bit packages:"
|
||||||
|
if ls req_libraries_32bit/bcrypt*.whl >/dev/null 2>&1; then
|
||||||
|
BCRYPT_FILE=$(basename $(ls req_libraries_32bit/bcrypt*.whl | head -1))
|
||||||
|
echo " 🔐 BCRYPT: $BCRYPT_FILE"
|
||||||
|
if [[ "$BCRYPT_FILE" == *"armv7l"* ]]; then
|
||||||
|
echo " ✅ Correct 32-bit architecture"
|
||||||
|
else
|
||||||
|
echo " ⚠️ Architecture unclear"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ls req_libraries_32bit/pillow*.whl >/dev/null 2>&1; then
|
||||||
|
PILLOW_FILE=$(basename $(ls req_libraries_32bit/pillow*.whl | head -1))
|
||||||
|
echo " 🖼️ PILLOW: $PILLOW_FILE"
|
||||||
|
if [[ "$PILLOW_FILE" == *"armv7l"* ]]; then
|
||||||
|
echo " ✅ Correct 32-bit architecture"
|
||||||
|
fi
|
||||||
|
elif ls req_libraries_32bit/Pillow-*.tar.gz >/dev/null 2>&1; then
|
||||||
|
PILLOW_SRC=$(basename $(ls req_libraries_32bit/Pillow-*.tar.gz | head -1))
|
||||||
|
echo " 🖼️ PILLOW source: $PILLOW_SRC"
|
||||||
|
echo " ⚠️ No wheel available for 32-bit ARM. Will need to build locally."
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "✅ 32-bit libraries download completed!"
|
||||||
|
echo ""
|
||||||
|
echo "📋 Next steps:"
|
||||||
|
echo " 1. Copy this folder to your 32-bit Raspberry Pi"
|
||||||
|
echo " 2. Run: ./install_32bit.sh"
|
||||||
|
echo " 3. If Pillow wheel is missing, run: ./build_pillow_local.sh (see instructions below)"
|
||||||
|
else
|
||||||
|
echo "❌ No wheel files downloaded"
|
||||||
|
echo ""
|
||||||
|
echo "💡 Troubleshooting:"
|
||||||
|
echo " • Check internet connection"
|
||||||
|
echo " • Verify requirements.txt exists"
|
||||||
|
echo " • Some packages may not have 32-bit wheels available"
|
||||||
|
fi
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Dedicated Offline Installer for 32-bit Raspberry Pi OS (armv7l)
|
# Dedicated Offline Installer for 32-bit Raspberry Pi OS (armv7l)
|
||||||
|
# Ensures clean installation with proper architecture isolation
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
@@ -12,6 +13,7 @@ ARCH=$(uname -m)
|
|||||||
echo "Architecture: $ARCH"
|
echo "Architecture: $ARCH"
|
||||||
if [ "$ARCH" != "armv7l" ]; then
|
if [ "$ARCH" != "armv7l" ]; then
|
||||||
echo "ERROR: This script is for 32-bit Raspberry Pi OS (armv7l) only!"
|
echo "ERROR: This script is for 32-bit Raspberry Pi OS (armv7l) only!"
|
||||||
|
echo "Current architecture: $ARCH"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -19,6 +21,7 @@ fi
|
|||||||
LIBS_FOLDER="req_libraries_32bit"
|
LIBS_FOLDER="req_libraries_32bit"
|
||||||
if [ ! -d "$LIBS_FOLDER" ]; then
|
if [ ! -d "$LIBS_FOLDER" ]; then
|
||||||
echo "ERROR: $LIBS_FOLDER not found!"
|
echo "ERROR: $LIBS_FOLDER not found!"
|
||||||
|
echo "Please download 32-bit libraries first."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -26,18 +29,75 @@ echo "Library folder: $LIBS_FOLDER"
|
|||||||
WHEEL_COUNT=$(ls $LIBS_FOLDER/*.whl | wc -l)
|
WHEEL_COUNT=$(ls $LIBS_FOLDER/*.whl | wc -l)
|
||||||
echo "Wheel files: $WHEEL_COUNT"
|
echo "Wheel files: $WHEEL_COUNT"
|
||||||
|
|
||||||
# 3. Create .venv
|
# 3. Show key 32-bit packages
|
||||||
echo "Creating .venv..."
|
echo ""
|
||||||
python3 -m venv .venv
|
echo "32-bit packages to install:"
|
||||||
|
if ls $LIBS_FOLDER/bcrypt*.whl >/dev/null 2>&1; then
|
||||||
|
BCRYPT_FILE=$(basename $(ls $LIBS_FOLDER/bcrypt*.whl | head -1))
|
||||||
|
echo " BCRYPT: $BCRYPT_FILE"
|
||||||
|
fi
|
||||||
|
echo ""
|
||||||
|
|
||||||
# 4. Activate environment
|
# 4. Clean existing virtual environment
|
||||||
|
if [ -d ".venv" ]; then
|
||||||
|
echo "Removing existing .venv to ensure clean installation..."
|
||||||
|
rm -rf .venv
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 5. Create fresh virtual environment
|
||||||
|
echo "Creating fresh virtual environment..."
|
||||||
|
python3 -m venv .venv --clear
|
||||||
|
|
||||||
|
# 6. Activate environment
|
||||||
|
echo "Activating virtual environment..."
|
||||||
source .venv/bin/activate
|
source .venv/bin/activate
|
||||||
|
|
||||||
# 5. Upgrade pip
|
# 7. Ensure we're using the virtual environment
|
||||||
|
echo "Python location: $(which python)"
|
||||||
|
echo "Pip location: $(which pip)"
|
||||||
|
|
||||||
|
# 8. Upgrade pip
|
||||||
|
echo "Upgrading pip..."
|
||||||
pip install --upgrade pip
|
pip install --upgrade pip
|
||||||
|
|
||||||
# 6. Install packages offline
|
# 9. Install packages with forced 32-bit isolation
|
||||||
pip install --no-index --no-deps --find-links $LIBS_FOLDER/ $LIBS_FOLDER/*.whl
|
echo ""
|
||||||
|
echo "Installing 32-bit packages (completely isolated)..."
|
||||||
|
pip install --no-index --no-deps --force-reinstall --find-links $LIBS_FOLDER/ $LIBS_FOLDER/*.whl
|
||||||
|
|
||||||
|
# 10. Verify 32-bit installation
|
||||||
|
echo ""
|
||||||
|
echo "Verifying 32-bit installation..."
|
||||||
|
python3 -c "
|
||||||
|
import sys
|
||||||
|
print(f'Python executable: {sys.executable}')
|
||||||
|
print(f'Architecture: $(uname -m)')
|
||||||
|
|
||||||
|
try:
|
||||||
|
import bcrypt
|
||||||
|
print('✅ bcrypt imported successfully')
|
||||||
|
# Test bcrypt functionality
|
||||||
|
password = b'test'
|
||||||
|
hashed = bcrypt.hashpw(password, bcrypt.gensalt())
|
||||||
|
if bcrypt.checkpw(password, hashed):
|
||||||
|
print('✅ bcrypt functionality test passed')
|
||||||
|
else:
|
||||||
|
print('❌ bcrypt functionality test failed')
|
||||||
|
except Exception as e:
|
||||||
|
print(f'❌ bcrypt import/test failed: {e}')
|
||||||
|
|
||||||
|
try:
|
||||||
|
import requests
|
||||||
|
print('✅ requests imported successfully')
|
||||||
|
except Exception as e:
|
||||||
|
print(f'❌ requests failed: {e}')
|
||||||
|
|
||||||
|
try:
|
||||||
|
import vlc
|
||||||
|
print('✅ python-vlc imported successfully')
|
||||||
|
except Exception as e:
|
||||||
|
print(f'❌ python-vlc failed: {e}')
|
||||||
|
"
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "✅ 32-bit installation completed!"
|
echo "✅ 32-bit installation completed!"
|
||||||
|
|||||||
@@ -8,16 +8,25 @@ echo " TKINTER PLAYER OFFLINE INSTALL"
|
|||||||
echo "================================="
|
echo "================================="
|
||||||
|
|
||||||
# 1. Check architecture
|
# 1. Check architecture
|
||||||
|
|
||||||
|
# Detect architecture, treating armhf and armv7l as 32-bit
|
||||||
ARCH=$(uname -m)
|
ARCH=$(uname -m)
|
||||||
echo "Architecture: $ARCH"
|
if lscpu | grep -qi 'armhf'; then
|
||||||
|
ARCH_TYPE="armhf"
|
||||||
|
else
|
||||||
|
ARCH_TYPE="$ARCH"
|
||||||
|
fi
|
||||||
|
echo "Architecture: $ARCH_TYPE"
|
||||||
|
|
||||||
# 2. Select library folder
|
# 2. Select library folder
|
||||||
if [ "$ARCH" = "armv7l" ]; then
|
|
||||||
|
# Use 32-bit libraries for armv7l or armhf
|
||||||
|
if [ "$ARCH_TYPE" = "armv7l" ] || [ "$ARCH_TYPE" = "armhf" ]; then
|
||||||
LIBS_FOLDER="req_libraries_32bit"
|
LIBS_FOLDER="req_libraries_32bit"
|
||||||
echo "Using: 32-bit libraries"
|
echo "Using: 32-bit libraries (armv7l/armhf)"
|
||||||
elif [ "$ARCH" = "aarch64" ]; then
|
elif [ "$ARCH_TYPE" = "aarch64" ]; then
|
||||||
LIBS_FOLDER="req_libraries"
|
LIBS_FOLDER="req_libraries"
|
||||||
echo "Using: 64-bit libraries"
|
echo "Using: 64-bit libraries (aarch64)"
|
||||||
else
|
else
|
||||||
LIBS_FOLDER="req_libraries"
|
LIBS_FOLDER="req_libraries"
|
||||||
echo "Using: default libraries"
|
echo "Using: default libraries"
|
||||||
|
|||||||
BIN
req_libraries_32bit/pillow-11.3.0.tar.gz
Normal file
BIN
req_libraries_32bit/pillow-11.3.0.tar.gz
Normal file
Binary file not shown.
Binary file not shown.
BIN
req_libraries_32bit/setuptools-80.9.0-py3-none-any.whl
Normal file
BIN
req_libraries_32bit/setuptools-80.9.0-py3-none-any.whl
Normal file
Binary file not shown.
BIN
req_libraries_32bit/wheel-0.45.1-py3-none-any.whl
Normal file
BIN
req_libraries_32bit/wheel-0.45.1-py3-none-any.whl
Normal file
Binary file not shown.
@@ -1,18 +1,7 @@
|
|||||||
# Core requirements for tkinter_player signage app
|
python-vlc
|
||||||
# Network and API requirements
|
Pillow
|
||||||
requests>=2.28.0
|
pyautogui
|
||||||
|
requests
|
||||||
# Security and encryption
|
bcrypt
|
||||||
bcrypt>=4.0.0
|
setuptools
|
||||||
|
wheel
|
||||||
# Media playback
|
|
||||||
python-vlc>=3.0.16120
|
|
||||||
|
|
||||||
# GUI automation and system control
|
|
||||||
pyautogui>=0.9.54
|
|
||||||
|
|
||||||
# Image processing (PIL/Pillow)
|
|
||||||
Pillow>=9.3.0
|
|
||||||
|
|
||||||
# System monitoring
|
|
||||||
psutil>=5.9.0
|
|
||||||
81
troubleshoot_32bit.sh
Executable file
81
troubleshoot_32bit.sh
Executable file
@@ -0,0 +1,81 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Troubleshooting script for 32-bit bcrypt issues
|
||||||
|
|
||||||
|
echo "🔍 32-BIT SYSTEM TROUBLESHOOTING"
|
||||||
|
echo "================================"
|
||||||
|
|
||||||
|
# System info
|
||||||
|
echo "1. System Information:"
|
||||||
|
echo " Architecture: $(uname -m)"
|
||||||
|
echo " OS: $(cat /etc/os-release | grep PRETTY_NAME | cut -d'"' -f2)"
|
||||||
|
echo " Python: $(python3 --version)"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Check if we're in virtual environment
|
||||||
|
echo "2. Environment Check:"
|
||||||
|
if [ -n "$VIRTUAL_ENV" ]; then
|
||||||
|
echo " ✅ In virtual environment: $VIRTUAL_ENV"
|
||||||
|
echo " Python location: $(which python)"
|
||||||
|
echo " Pip location: $(which pip)"
|
||||||
|
else
|
||||||
|
echo " ❌ Not in virtual environment"
|
||||||
|
echo " System Python: $(which python3)"
|
||||||
|
fi
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Check bcrypt installation
|
||||||
|
echo "3. Bcrypt Investigation:"
|
||||||
|
if [ -n "$VIRTUAL_ENV" ]; then
|
||||||
|
echo " Checking installed bcrypt..."
|
||||||
|
pip list | grep bcrypt || echo " ❌ bcrypt not installed"
|
||||||
|
|
||||||
|
echo " Testing bcrypt import..."
|
||||||
|
python3 -c "
|
||||||
|
try:
|
||||||
|
import bcrypt
|
||||||
|
print(' ✅ bcrypt imports successfully')
|
||||||
|
|
||||||
|
# Check bcrypt module location
|
||||||
|
print(f' Module location: {bcrypt.__file__}')
|
||||||
|
|
||||||
|
# Test basic functionality
|
||||||
|
test_pw = b'test123'
|
||||||
|
hashed = bcrypt.hashpw(test_pw, bcrypt.gensalt())
|
||||||
|
if bcrypt.checkpw(test_pw, hashed):
|
||||||
|
print(' ✅ bcrypt functionality works')
|
||||||
|
else:
|
||||||
|
print(' ❌ bcrypt functionality failed')
|
||||||
|
|
||||||
|
except ImportError as e:
|
||||||
|
print(f' ❌ bcrypt import failed: {e}')
|
||||||
|
except Exception as e:
|
||||||
|
print(f' ❌ bcrypt error: {e}')
|
||||||
|
"
|
||||||
|
else
|
||||||
|
echo " ⚠️ Please activate virtual environment first"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "4. Library Files Check:"
|
||||||
|
if [ -d "req_libraries_32bit" ]; then
|
||||||
|
echo " ✅ req_libraries_32bit exists"
|
||||||
|
if ls req_libraries_32bit/bcrypt*.whl >/dev/null 2>&1; then
|
||||||
|
BCRYPT_FILE=$(ls req_libraries_32bit/bcrypt*.whl | head -1)
|
||||||
|
echo " 32-bit bcrypt: $(basename $BCRYPT_FILE)"
|
||||||
|
|
||||||
|
# Quick check of wheel architecture
|
||||||
|
echo " Checking wheel architecture..."
|
||||||
|
unzip -l "$BCRYPT_FILE" | grep "\.so" | head -1 || echo " No .so files found"
|
||||||
|
else
|
||||||
|
echo " ❌ No bcrypt wheel found in 32-bit libraries"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo " ❌ req_libraries_32bit folder missing"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "5. Recommendations:"
|
||||||
|
echo " • Ensure you're on 32-bit Raspberry Pi OS (armv7l)"
|
||||||
|
echo " • Use: source .venv/bin/activate"
|
||||||
|
echo " • Run: ./install_32bit.sh for clean installation"
|
||||||
|
echo " • If still failing, remove .venv and reinstall"
|
||||||
Reference in New Issue
Block a user