Skip to content

Commit 6a3e153

Browse files
committed
Fix pandas ModuleNotFoundError - rebuild from source and clean requirements
1 parent d163e93 commit 6a3e153

2 files changed

Lines changed: 9 additions & 16 deletions

File tree

Dockerfile.apprunner

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,18 @@ WORKDIR /opt/app
77
RUN apt-get update && apt-get install -y \
88
build-essential \
99
curl \
10+
gcc \
11+
g++ \
12+
libc6-dev \
1013
&& rm -rf /var/lib/apt/lists/*
1114

1215
# Copy requirements first for better caching
1316
COPY requirements.txt .
1417

15-
# Install Python dependencies
18+
# Install Python dependencies with pandas fix
1619
RUN pip install --no-cache-dir --upgrade pip && \
20+
pip install --no-cache-dir numpy && \
21+
pip install --no-cache-dir --no-binary pandas pandas && \
1722
pip install --no-cache-dir -r requirements.txt
1823

1924
# Copy application code

requirements.txt

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
requests==2.31.0
22
beautifulsoup4==4.12.2
3-
pandas==2.0.3
3+
pandas==2.2.2
44
lxml==4.9.3
55
openpyxl==3.1.2
66
Flask==3.0.0
@@ -12,17 +12,5 @@ typing-extensions>=4.7.0
1212
pytest==7.4.0
1313
httpx==0.27.0
1414
pyarrow==16.1.0
15-
gunicorn==21.2.0.0
16-
beautifulsoup4==4.12.2
17-
pandas==2.0.3
18-
lxml==4.9.3
19-
openpyxl==3.1.2
20-
Flask==3.0.0
21-
flask-cors==4.0.0
22-
Flask-Limiter==3.3.1
23-
python-dotenv==1.0.0
24-
Werkzeug==3.0.1
25-
typing-extensions==4.7.0
26-
pytest==7.4.0
27-
httpx==0.27.0
28-
pyarrow==16.1.0
15+
gunicorn==21.2.0
16+
numpy==1.24.3

0 commit comments

Comments
 (0)