Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
我无法在heroku上推送我的python代码_Python_Heroku - Fatal编程技术网

我无法在heroku上推送我的python代码

我无法在heroku上推送我的python代码,python,heroku,Python,Heroku,我正在尝试将python代码部署到heroku。但是在将代码推送到heroku时,我得到了以下错误。我的git存储库以前有Node.js代码,现在我删除了所有这些代码并添加了python。我希望这不会影响任何事情 compile options: '-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Inumpy/core/include -Ibuild/src.linux-x86_64-3.9/numpy/

我正在尝试将python代码部署到heroku。但是在将代码推送到heroku时,我得到了以下错误。我的git存储库以前有Node.js代码,现在我删除了所有这些代码并添加了python。我希望这不会影响任何事情

compile options: '-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Inumpy/core/include -Ibuild/src.linux-x86_64-3.9/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/app/.heroku/python/include/python3.9 -Ibuild/src.linux-x86_64-3.9/numpy/core/src/private -Ibuild/src.linux-x86_64-3.9/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.9/numpy/core/src/private -Ibuild/src.linux-x86_64-3.9/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.9/numpy/core/src/private -Ibuild/src.linux-x86_64-3.9/numpy/core/src/npymath -c' 
remote:              gcc: numpy/random/mtrand/mtrand.c
remote:              numpy/random/mtrand/mtrand.c: In function ‘__Pyx_modinit_type_init_code’:
remote:              numpy/random/mtrand/mtrand.c:43635:33: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print 
remote:              43635 |   __pyx_type_6mtrand_RandomState.tp_print = 0;
remote:                    |                                 ^
remote:              numpy/random/mtrand/mtrand.c: In function ‘__Pyx_ParseOptionalKeywords’:
remote:              numpy/random/mtrand/mtrand.c:45390:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations 
remote:              45390 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
remote:                    |                     ^
remote:              In file included from /app/.heroku/python/include/python3.9/unicodeobject.h:1026,
remote:                               from /app/.heroku/python/include/python3.9/Python.h:97,
remote:                               from numpy/random/mtrand/mtrand.c:4:
remote:              /app/.heroku/python/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
remote:                446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
remote:                    |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
remote:              numpy/random/mtrand/mtrand.c:45390:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]       
remote:              45390 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
remote:                    |                     ^
remote:              In file included from /app/.heroku/python/include/python3.9/unicodeobject.h:1026,
remote:                               from /app/.heroku/python/include/python3.9/Python.h:97,
remote:                               from numpy/random/mtrand/mtrand.c:4:
remote:              /app/.heroku/python/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
remote:                580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
remote:                    |                                             ^~~~~~~~~~~~~~~~~~~
remote:              numpy/random/mtrand/mtrand.c:45390:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations 
remote:              45390 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
remote:                    |                     ^
remote:              In file included from /app/.heroku/python/include/python3.9/unicodeobject.h:1026,
remote:                               from /app/.heroku/python/include/python3.9/Python.h:97,
remote:                               from numpy/random/mtrand/mtrand.c:4:
remote:              /app/.heroku/python/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
remote:                446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
remote:                    |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
remote:              numpy/random/mtrand/mtrand.c:45390:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations 
remote:              45390 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
remote:                    |                     ^
remote:              In file included from /app/.heroku/python/include/python3.9/unicodeobject.h:1026,
remote:                               from /app/.heroku/python/include/python3.9/Python.h:97,
remote:                               from numpy/random/mtrand/mtrand.c:4:
remote:              /app/.heroku/python/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
remote:                446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
remote:                    |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
remote:              numpy/random/mtrand/mtrand.c:45390:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]       
remote:              45390 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
remote:                    |                     ^
remote:              In file included from /app/.heroku/python/include/python3.9/unicodeobject.h:1026,
remote:                               from /app/.heroku/python/include/python3.9/Python.h:97,
remote:                               from numpy/random/mtrand/mtrand.c:4:
remote:              /app/.heroku/python/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
remote:                580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
remote:                    |                                             ^~~~~~~~~~~~~~~~~~~
remote:              numpy/random/mtrand/mtrand.c:45390:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations 
remote:              45390 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
remote:                    |                     ^
remote:              In file included from /app/.heroku/python/include/python3.9/unicodeobject.h:1026,
remote:                               from /app/.heroku/python/include/python3.9/Python.h:97,
remote:                               from numpy/random/mtrand/mtrand.c:4:
remote:              /app/.heroku/python/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
remote:                446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
remote:                    |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
remote:              numpy/random/mtrand/mtrand.c:45406:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations 
remote:              45406 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
remote:                    |                         ^
remote:              In file included from /app/.heroku/python/include/python3.9/unicodeobject.h:1026,
remote:                               from /app/.heroku/python/include/python3.9/Python.h:97,
remote:                               from numpy/random/mtrand/mtrand.c:4:
remote:              /app/.heroku/python/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
remote:                446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
remote:                    |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
remote:              numpy/random/mtrand/mtrand.c:45406:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]       
remote:              45406 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
remote:                    |                         ^
remote:              In file included from /app/.heroku/python/include/python3.9/unicodeobject.h:1026,
remote:                               from /app/.heroku/python/include/python3.9/Python.h:97,
remote:                               from numpy/random/mtrand/mtrand.c:4:
remote:              /app/.heroku/python/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
remote:                580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
remote:                    |                                             ^~~~~~~~~~~~~~~~~~~
remote:              numpy/random/mtrand/mtrand.c:45406:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations 
remote:              45406 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
remote:                    |                         ^
remote:              In file included from /app/.heroku/python/include/python3.9/unicodeobject.h:1026,
remote:                               from /app/.heroku/python/include/python3.9/Python.h:97,
remote:                               from numpy/random/mtrand/mtrand.c:4:
remote:              /app/.heroku/python/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
remote:                446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
remote:                    |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
remote:              numpy/random/mtrand/mtrand.c:45406:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations 
remote:              45406 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
remote:                    |                         ^
remote:              In file included from /app/.heroku/python/include/python3.9/unicodeobject.h:1026,
remote:                               from /app/.heroku/python/include/python3.9/Python.h:97,
remote:                               from numpy/random/mtrand/mtrand.c:4:
remote:              /app/.heroku/python/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
remote:                446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
remote:                    |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
remote:              numpy/random/mtrand/mtrand.c:45406:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]       
remote:              45406 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
remote:                    |                         ^
remote:              In file included from /app/.heroku/python/include/python3.9/unicodeobject.h:1026,
remote:                               from /app/.heroku/python/include/python3.9/Python.h:97,
remote:                               from numpy/random/mtrand/mtrand.c:4:
remote:              /app/.heroku/python/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
remote:                580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
remote:                    |                                             ^~~~~~~~~~~~~~~~~~~
remote:              numpy/random/mtrand/mtrand.c:45406:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations 
remote:              45406 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
remote:                    |                         ^
remote:              In file included from /app/.heroku/python/include/python3.9/unicodeobject.h:1026,
remote:                               from /app/.heroku/python/include/python3.9/Python.h:97,
remote:                               from numpy/random/mtrand/mtrand.c:4:
remote:              /app/.heroku/python/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
remote:                446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
remote:                    |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
remote:              numpy/random/mtrand/mtrand.c: In function ‘__Pyx_modinit_type_init_code’:
remote:              numpy/random/mtrand/mtrand.c:43635:33: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print 
remote:              43635 |   __pyx_type_6mtrand_RandomState.tp_print = 0;
remote:                    |                                 ^
remote:              numpy/random/mtrand/mtrand.c: In function ‘__Pyx_ParseOptionalKeywords’:
remote:              numpy/random/mtrand/mtrand.c:45390:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations 
remote:              45390 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
remote:                    |                     ^
remote:              In file included from /app/.heroku/python/include/python3.9/unicodeobject.h:1026,
remote:                               from /app/.heroku/python/include/python3.9/Python.h:97,
remote:                               from numpy/random/mtrand/mtrand.c:4:
remote:              /app/.heroku/python/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
remote:                446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
remote:                    |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
remote:              numpy/random/mtrand/mtrand.c:45390:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]       
remote:              45390 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
remote:                    |                     ^
remote:              In file included from /app/.heroku/python/include/python3.9/unicodeobject.h:1026,
remote:                               from /app/.heroku/python/include/python3.9/Python.h:97,
remote:                               from numpy/random/mtrand/mtrand.c:4:
remote:              /app/.heroku/python/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
remote:                580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
remote:                    |                                             ^~~~~~~~~~~~~~~~~~~
remote:              numpy/random/mtrand/mtrand.c:45390:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations 
remote:              45390 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
remote:                    |                     ^
remote:              In file included from /app/.heroku/python/include/python3.9/unicodeobject.h:1026,
remote:                               from /app/.heroku/python/include/python3.9/Python.h:97,
remote:                               from numpy/random/mtrand/mtrand.c:4:
remote:              /app/.heroku/python/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
remote:                446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
remote:                    |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
remote:              numpy/random/mtrand/mtrand.c:45390:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations 
remote:              45390 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
remote:                    |                     ^
remote:              In file included from /app/.heroku/python/include/python3.9/unicodeobject.h:1026,
remote:                               from /app/.heroku/python/include/python3.9/Python.h:97,
remote:                               from numpy/random/mtrand/mtrand.c:4:
remote:              /app/.heroku/python/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
remote:                446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
remote:                    |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
remote:              numpy/random/mtrand/mtrand.c:45390:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]       
remote:              45390 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
remote:                    |                     ^
remote:              In file included from /app/.heroku/python/include/python3.9/unicodeobject.h:1026,
remote:                               from /app/.heroku/python/include/python3.9/Python.h:97,
remote:                               from numpy/random/mtrand/mtrand.c:4:
remote:              /app/.heroku/python/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
remote:                580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
remote:                    |                                             ^~~~~~~~~~~~~~~~~~~
remote:              numpy/random/mtrand/mtrand.c:45390:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations 
remote:              45390 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
remote:                    |                     ^
remote:              In file included from /app/.heroku/python/include/python3.9/unicodeobject.h:1026,
remote:                               from /app/.heroku/python/include/python3.9/Python.h:97,
remote:                               from numpy/random/mtrand/mtrand.c:4:
remote:              /app/.heroku/python/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
remote:                446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
remote:                    |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
remote:              numpy/random/mtrand/mtrand.c:45406:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations 
remote:              45406 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
remote:                    |                         ^
remote:              In file included from /app/.heroku/python/include/python3.9/unicodeobject.h:1026,
remote:                               from /app/.heroku/python/include/python3.9/Python.h:97,
remote:                               from numpy/random/mtrand/mtrand.c:4:
remote:              /app/.heroku/python/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
remote:                446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
remote:                    |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
remote:              numpy/random/mtrand/mtrand.c:45406:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]       
remote:              45406 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
remote:                    |                         ^
remote:              In file included from /app/.heroku/python/include/python3.9/unicodeobject.h:1026,
remote:                               from /app/.heroku/python/include/python3.9/Python.h:97,
remote:                               from numpy/random/mtrand/mtrand.c:4:
remote:              /app/.heroku/python/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
remote:                580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
remote:                    |                                             ^~~~~~~~~~~~~~~~~~~
remote:              numpy/random/mtrand/mtrand.c:45406:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations 
remote:              45406 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
remote:                    |                         ^
remote:              In file included from /app/.heroku/python/include/python3.9/unicodeobject.h:1026,
remote:                               from /app/.heroku/python/include/python3.9/Python.h:97,
remote:                               from numpy/random/mtrand/mtrand.c:4:
remote:              /app/.heroku/python/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
remote:                446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
remote:                    |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
remote:              numpy/random/mtrand/mtrand.c:45406:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations 
remote:              45406 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
remote:                    |                         ^
remote:              In file included from /app/.heroku/python/include/python3.9/unicodeobject.h:1026,
remote:                               from /app/.heroku/python/include/python3.9/Python.h:97,
remote:                               from numpy/random/mtrand/mtrand.c:4:
remote:              /app/.heroku/python/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
remote:                446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
remote:                    |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
remote:              numpy/random/mtrand/mtrand.c:45406:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]       
remote:              45406 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
remote:                    |                         ^
remote:              In file included from /app/.heroku/python/include/python3.9/unicodeobject.h:1026,
remote:                               from /app/.heroku/python/include/python3.9/Python.h:97,
remote:                               from numpy/random/mtrand/mtrand.c:4:
remote:              /app/.heroku/python/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
remote:                580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
remote:                    |                                             ^~~~~~~~~~~~~~~~~~~
remote:              numpy/random/mtrand/mtrand.c:45406:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations 
remote:              45406 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
remote:                    |                         ^
remote:              In file included from /app/.heroku/python/include/python3.9/unicodeobject.h:1026,
remote:                               from /app/.heroku/python/include/python3.9/Python.h:97,
remote:                               from numpy/random/mtrand/mtrand.c:4:
remote:              /app/.heroku/python/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
remote:                446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
remote:                    |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
remote:              error: Command "gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Inumpy/core/include -Ibuild/src.linux-x86_64-3.9/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/app/.heroku/python/include/python3.9 -Ibuild/src.linux-x86_64-3.9/numpy/core/src/private -Ibuild/src.linux-x86_64-3.9/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.9/numpy/core/src/private -Ibuild/src.linux-x86_64-3.9/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.9/numpy/core/src/private -Ibuild/src.linux-x86_64-3.9/numpy/core/src/npymath -c numpy/random/mtrand/mtrand.c -o build/temp.linux-x86_64-3.9/numpy/random/mtrand/mtrand.o -MMD -MF build/temp.linux-x86_64-3.9/numpy/random/mtrand/mtrand.o.d" failed with exit status 1
remote:              ----------------------------------------
remote:          ERROR: Command errored out with exit status 1: /app/.heroku/python/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-nhrx3l7h/numpy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-nhrx3l7h/numpy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-9fd5l1mn/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-11vd9tgp/overlay --compile --install-headers /tmp/pip-build-env-11vd9tgp/overlay/include/python3.9/numpy Check the logs for full command output.   
remote:          WARNING: You are using pip version 20.2.4; however, version 21.1.1 is available.
remote:          You should consider upgrading via the '/app/.heroku/python/bin/python -m pip install --upgrade pip' command.
remote:          ----------------------------------------
remote:        ERROR: Command errored out with exit status 1: /app/.heroku/python/bin/python /app/.heroku/python/lib/python3.9/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-11vd9tgp/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'Cython>=0.29.13' 'numpy==1.13.3; python_version=='"'"'3.6'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.14.5; python_version>='"'"'3.7'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.6'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.16.0; python_version>='"'"'3.7'"'"' and platform_system=='"'"'AIX'"'"'' Check the logs for full command output.
remote:  !     Push rejected, failed to compile Python app.
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to project-name.
remote:
To https://git.heroku.com/project-name.git
 ! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/project-name.git'


有人能告诉我怎么修吗?我有requirements.txt甚至升级了setuptools。它仍然显示了这个错误。代码文件只有app.py和requirements.txt,据我所知,您的代码已经“清理”了,可以从节点切换到python

错误可能出现在Heroku构建包中: 如果您仍然使用同一个Heroku项目,但是使用不同的语言/环境,那么您也必须切换构建包(从NodeJS构建包切换到Python构建包)


否则,您将出现与生成相关的错误(如上面的错误),因为Heroku不知道如何生成和打包您的应用程序代码。

您好,谢谢您的回答。我已经创建了新的heroku项目。我正试图在上面部署。我仍然得到相同的错误。你在这个新项目中使用python buildpack吗?是的,我添加了python buildpack。。。我在heroku上创建了一个新项目。。仍然得到相同的错误。尽管它在本地主机上运行良好:/