Сбой сборки для приложения Django, запущенного на Heroku
В настоящее время я работаю над проектом, в котором я хочу, чтобы мое приложение Django запускалось. Само приложение размещено на Heroku, и поэтому у меня есть файл requirements.txt со следующими пакетами:
- django-heroku==0.3.1
- django==3.2.7
- gunicorn==20.1.0
- noise==1.2.1
- numpy==1.19.2
- pandas==1.2.4
- scipy==1.6.3
- scikit-image==0.17.2
- Cython==0.29.23
- opencv-python==4.4.0.46
Недавно я добавил пакеты Cython и OpenCV, поскольку они необходимы мне для пакета POT. Однако, когда я пытаюсь развернуть приложение, в журнале сборки говорится, что нет модуля с именем numpy. Я предполагаю, что это потому, что numpy еще не был "установлен". Вот полный журнал сборки:
-----> Building on the Heroku-20 stack
-----> Using buildpack: heroku/python
-----> Python app detected
-----> No Python version was specified. Using the
same version as the last build: python-3.9.7
To use a different version, see:
https://devcenter.heroku.com/articles/python runtimes
-----> Requirements file has been changed, clearing
cached dependencies
-----> Installing python-3.9.7
-----> Installing pip 20.2.4, setuptools 47.1.1 and
wheel 0.36.2
-----> Installing SQLite3
-----> Installing requirements with pip
Collecting django-heroku==0.3.1
Downloading django_heroku-0.3.1-py2.py3-none- any.whl (6.2 kB)
Collecting django==3.2.7
Downloading Django-3.2.7-py3-none-any.whl (7.9 MB)
Collecting gunicorn==20.1.0
Downloading gunicorn-20.1.0-py3-none-any.whl (79 kB)
Collecting noise==1.2.1
Downloading noise-1.2.1.tar.gz (125 kB)
Collecting numpy==1.19.2
Downloading numpy-1.19.2.zip (7.3 MB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'done'
Collecting pandas==1.2.4
Downloading pandas-1.2.4-cp39-cp39-manylinux1_x86_64.whl (9.7 MB)
Collecting scipy==1.6.3
Downloading scipy-1.6.3-cp39-cp39-manylinux1_x86_64.whl (27.3 MB)
Collecting scikit-image==0.17.2
Downloading scikit-image-0.17.2.tar.gz (29.8 MB)
ERROR: Command errored out with exit status 1:
command: /app/.heroku/python/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3505pomr/scikit-image/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3505pomr/scikit-image/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-jr5fh6db
cwd: /tmp/pip-install-3505pomr/scikit-image/
Complete output (7 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-3505pomr/scikit-image/setup.py", line 234, in <module>
'build_ext': openmp_build_ext(),
File "/tmp/pip-install-3505pomr/scikit-image/setup.py", line 58, in openmp_build_ext
from numpy.distutils.command.build_ext import build_ext
ModuleNotFoundError: No module named 'numpy'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
! Push rejected, failed to compile Python app.
! Push failed
Я довольно новичок в этом, поэтому не знаю, с чего начать решение этой проблемы, и возможно ли ее вообще решить.