Heroku:推送失败的python

时间:2021-05-18 22:12:21

标签: python heroku

我是 Python 新手,我正在尝试使用 heroku 实现一个 Web 应用程序。但是当我尝试在 heroku 上推送我的应用程序时遇到了一个重大错误。 Flask 已用于该项目。 我的代码:

最后一行

我的要求。文本:

antiorm==1.2.1
async-generator==1.10
attrs==19.3.0
backcall==0.1.0
beautifulsoup4==4.9.0
bleach==3.1.5
branca==0.4.1
Brotli==1.0.9
bs4==0.0.1
certifi==2020.4.5.1
chardet==3.0.4
click==7.1.2
colorama==0.4.3
cv==1.0.0
cycler==0.10.0
dash==1.20.0
dash-core-components==1.16.0
dash-html-components==1.1.3
dash-renderer==1.9.1
dash-table==4.11.3
db==0.1.1
decorator==4.4.2
defusedxml==0.6.0
djitellopy @ https://github.com/damiafuentes/DJITelloPy/archive/master.zip
dlib==19.21.1
entrypoints==0.3
Flask==1.1.2
Flask-Compress==1.9.0
Flask-SQLAlchemy==2.5.1
folium==0.11.0
future==0.18.2
greenlet==1.0.0
gunicorn==20.1.0
idna==2.9
importlib-metadata==1.6.0
imutils==0.5.4
ipykernel==5.2.1
ipython==7.14.0
ipython-genutils==0.2.0
ipywidgets==7.5.1
itsdangerous==1.1.0
jedi==0.17.0
Jinja2==2.11.2
joblib==0.14.1
jsonschema==3.2.0
jupyter==1.0.0
jupyter-client==6.1.3
jupyter-console==6.1.0
jupyter-core==4.6.3
jupyter-server==0.1.1
jupyterlab-pygments==0.1.1
kiwisolver==1.2.0
MarkupSafe==1.1.1
matplotlib==3.2.1
mistune==0.8.4
nbconvert==5.6.1
nbformat==5.0.6
nltk==3.6.2
notebook==6.0.3
numpy==1.18.4
opencv-python==4.4.0.42
packaging==20.3
pandas==1.0.3
pandocfilters==1.4.2
parso==0.7.0
pickleshare==0.7.5
Pillow==7.1.2
plotly==4.14.3
prettytable==0.7.2
prometheus-client==0.7.1
prompt-toolkit==3.0.5
psycopg2==2.8.6
pygame==1.9.6
Pygments==2.6.1
PyMeta==0.5.0
pyparsing==2.4.7
pyrsistent==0.16.0
python-dateutil==2.8.1
pytz==2020.1
pywin32==227
pywinpty==0.5.7
pyzmq==19.0.1
qtconsole==4.7.3
QtPy==1.9.0
regex==2021.4.4
requests==2.23.0
retrying==1.3.3
scikit-learn==0.22.2.post1
scipy==1.4.1
seaborn==0.10.1
Send2Trash==1.5.0
six==1.14.0
soupsieve==2.0
SQLAlchemy==1.4.12
terminado==0.8.3
testpath==0.4.4
tornado==6.0.4
tqdm==4.60.0
traitlets==4.3.3
urllib3==1.25.9
voila==0.1.21
wcwidth==0.1.9
webencodings==0.5.1
Werkzeug==1.0.1
widgetsnbextension==3.5.1
xlrd==1.2.0
zipp==3.1.0
 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-khx3bb78/numpy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-khx3bb78/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-sq9fpxn6/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-jbl9gw2f/overlay --compile --install-headers /tmp/pip-build-env-jbl9gw2f/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-jbl9gw2f/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:  
remote:## Warning - The same version of this code has already been built: a9dbf083599b3ea321c0012c31ba6fa46c6b63b8
remote:  !
remote:  ! We have detected that you have triggered a build from source code with version a9dbf083599b3ea321c0012c31ba6fa46c6b63b8
remote:  ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch.
remote:  !
remote:  ! If you are developing on a branch and deploying via git you must run:
remote:  !
remote:  !     git push heroku <branchname>:main
remote:  !
remote:  ! This article goes into details on the behavior:
remote:  !   https://devcenter.heroku.com/articles/duplicate-build-version
remote:
remote: Verifying deploy...
remote:
remote: !       Push rejected to websitepw.
remote:
To heroku.com:websitepw.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'heroku.com:websitepw.git'





有人有解决这个问题的想法吗?我曾尝试重新安装 numpy,但此错误仍在继续。

0 个答案:

没有答案