6 months ago
Support team,
Our Django application fails to import pandas in the default container.
The traceback always ends in a numpy ImportError (full log below).
We have tested every pandas release ≥1.0 with identical results.
Could you:
Confirm the base image and numpy version pre-installed in the default container.
Advise on any platform-specific build flags or wheels we should use.
Grant us temporary shell access so we can rebuild numpy against the container’s BLAS/LAPACK?
If a custom image is required, please point us to your Dockerfile template and any internal package mirrors we must use.
Thanks in advace.
Mauricio
(venv) root@0628a7e59180:/app# python -c "import pandas as pd"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/venv/lib/python3.12/site-packages/pandas/__init__.py", line 16, in <module>
raise ImportError(
ImportError: Unable to import required dependencies:
numpy: Error importing numpy: you should not try to import numpy from
its source directory; please exit the numpy source tree, and relaunch
your python interpreter from there.
Build log:
==============
Using Nixpacks
==============
context: js2r-haIw
╔══════════════════════════════ Nixpacks v1.38.0 ══════════════════════════════╗
║ setup │ python3, postgresql_16.dev, gcc ║
║──────────────────────────────────────────────────────────────────────────────║
║ install │ python -m venv --copies /opt/venv && . /opt/venv/bin/activate ║
║ │ && pip install -r requirements.txt ║
║──────────────────────────────────────────────────────────────────────────────║
║ start │ python manage.py collectstatic --noinput && python manage.py ║
║ │ migrate && gunicorn hys.wsgi --bind 0.0.0.0:$PORT ║
╚══════════════════════════════════════════════════════════════════════════════╝
internal
load build definition from Dockerfile
0ms
internal
load metadata for ghcr.io/railwayapp/nixpacks:ubuntu-1745885067
513ms
internal
load .dockerignore
0ms
stage-0
999ms
internal
load build context
0ms
stage-0
RUN nix-env -if .nixpacks/nixpkgs-bc8f8d1be58e8c8383e683a06e1e1e57893fff87.nix && nix-collect-garbage -d cached
0ms
stage-0
COPY .nixpacks/nixpkgs-bc8f8d1be58e8c8383e683a06e1e1e57893fff87.nix .nixpacks/nixpkgs-bc8f8d1be58e8c8383e683a06e1e1e57893fff87.nix cached
0ms
stage-0
WORKDIR /app/ cached
0ms
stage-0
COPY . /app/.
2s
stage-0
RUN python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt
57s
Successfully installed Django-4.2.17 Pygments-2.18.0 amqp-5.3.1 asgiref-3.8.1 asttokens-3.0.0 backcall-0.2.0 beautifulsoup4-4.12.3 billiard-4.2.1 celery-5.4.0 certifi-2024.8.30 chardet-5.2.0 charset-normalizer-3.4.0 click-8.1.8 click-didyoumean-0.3.1 click-plugins-1.1.1 click-repl-0.3.0 crispy-bootstrap5-2023.10 decorator-5.1.1 dj-database-url-2.1.0 django-appconf-1.0.6 django-autocomplete-light-3.9.7 django-bootstrap-v5-1.0.11 django-celery-results-2.5.1 django-ckeditor-6.2.0 django-colorfield-0.11.0 django-crispy-forms-2.1 django-debug-toolbar-4.4.6 django-extensions-3.2.3 django-filter-24.3 django-fontawesome-5-1.0.18 django-js-asset-2.2.0 django-pivot-1.10.0 django-select2-8.1.2 djangorestframework-3.14.0 executing-2.1.0 gunicorn-23.0.0 idna-3.10 iniconfig-2.0.0 ipython-8.12.3 jedi-0.19.2 kombu-5.4.2 matplotlib-inline-0.1.7 networkx-3.4.2 numpy-2.3.3 packaging-24.2 pandas-2.2.3 parso-0.8.4 pexpect-4.9.0 pickleshare-0.7.5 pillow-11.0.0 pluggy-1.5.0 prompt_toolkit-3.0.48 psutil-7.0.0 psycopg2-binary-2.9.10 ptyprocess-0.7.0 pure_eval-0.2.3 pytest-8.3.4 python-dateutil-2.8.2 python-dotenv-1.0.1 pytz-2024.2 redis-5.2.1 reportlab-4.2.2 requests-2.32.3 six-1.17.0 soupsieve-2.6 sqlparse-0.5.3 stack-data-0.6.3 traitlets-5.14.3 typing_extensions-4.12.2 tzdata-2024.2 urllib3-2.2.3 vine-5.1.0 wcwidth-0.2.13 whitenoise-6.6.0
stage-0
RUN printf '\nPATH=/opt/venv/bin:$PATH' >> /root/.profile
27s
stage-0
COPY . /app
42ms
auth
sharing credentials for production-us-east4-eqdc4a.railway-registry.com
0ms
=== Successfully Built! ===
Run:
docker run -it production-us-east4-eqdc4a.railway-registry.com/d8df5d99-5bfb-474c-b8af-ed5390cb4666:82911456-2d22-453c-a1ba-a2d527f72a0b
Build time: 115.39 seconds
Deploy log:
Starting Container
125 static files copied to '/app/static'.
Operations to perform:
Apply all migrations: admin, auth, contenttypes, sessions
Running migrations:
No migrations to apply.
[2025-09-18 18:48:47 +0000] [1] [INFO] Starting gunicorn 23.0.0
[2025-09-18 18:48:47 +0000] [1] [INFO] Listening at: http://0.0.0.0:8080 (1)
[2025-09-18 18:48:47 +0000] [1] [INFO] Using worker: sync
[2025-09-18 18:48:47 +0000] [6] [INFO] Booting worker with pid: 6
2 Replies
6 months ago
Hey there! We've found the following might help you get unblocked faster:
🧵 Help needed getting React frontend/PHP backend talking - CORS issues
🧵 Is it possible to change the default config of a Mysql Container?
If you find the answer from one of these, please let us know by solving the thread!
6 months ago
Apologies but this looks like an issue with the application level code. Due to volume, we can only answer platform level issues.
I've made this thread public so that the community might be able to help with you query.
Status changed to Awaiting User Response Railway • 6 months ago
6 months ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open jake • 6 months ago