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
推送被拒绝,无法将Python应用程序推送到Heroku_Heroku - Fatal编程技术网

推送被拒绝,无法将Python应用程序推送到Heroku

推送被拒绝,无法将Python应用程序推送到Heroku,heroku,Heroku,我正在将我的python应用程序推送到heroku,但它在dependencies上失败了,它显示的错误是未安装Rust packet manager,但它已安装在我的pc上 所有的依赖都很好,但最后,我发现了错误,这是日志 Enumerating objects: 5, done. Counting objects: 100% (5/5), done. Delta compression using up to 16 threads Compressing objects: 100% (4/4

我正在将我的python应用程序推送到heroku,但它在dependencies上失败了,它显示的错误是未安装Rust packet manager,但它已安装在我的pc上

所有的依赖都很好,但最后,我发现了错误,这是日志

Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 16 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (5/5), 1.09 KiB | 1.09 MiB/s, done.
Total 5 (delta 0), reused 0 (delta 0), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> Using buildpack: heroku/python
remote: -----> Python app detected
remote: -----> No Python version was specified. Using the buildpack default: python-3.9.5
remote:        To use a different version, see: https://devcenter.heroku.com/articles/python-runtimes
remote: -----> Installing python-3.9.5
remote: -----> Installing pip 20.2.4, setuptools 47.1.1 and wheel 0.36.2
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote:        Collecting anyio==2.2.0
remote:          Downloading anyio-2.2.0-py3-none-any.whl (65 kB)
remote:        Collecting argon2-cffi==20.1.0
remote:          Downloading argon2_cffi-20.1.0-cp35-abi3-manylinux1_x86_64.whl (97 kB)
remote:        Collecting async-generator==1.10
remote:          Downloading async_generator-1.10-py3-none-any.whl (18 kB)
remote:        Collecting attrs==20.3.0
remote:          Downloading attrs-20.3.0-py2.py3-none-any.whl (49 kB)
remote:        Collecting Babel==2.9.1
remote:          Downloading Babel-2.9.1-py2.py3-none-any.whl (8.8 MB)
remote:        Collecting backcall==0.2.0
remote:          Downloading backcall-0.2.0-py2.py3-none-any.whl (11 kB)
remote:        Collecting bleach==3.3.0
remote:          Downloading bleach-3.3.0-py2.py3-none-any.whl (283 kB)
remote:        Collecting certifi==2020.12.5
remote:          Downloading certifi-2020.12.5-py2.py3-none-any.whl (147 kB)
remote:        Collecting cffi==1.14.5
remote:          Downloading cffi-1.14.5-cp39-cp39-manylinux1_x86_64.whl (406 kB)
remote:        Collecting chardet==4.0.0
remote:          Downloading chardet-4.0.0-py2.py3-none-any.whl (178 kB)
remote:        Collecting colorama==0.4.4
remote:          Downloading colorama-0.4.4-py2.py3-none-any.whl (16 kB)
remote:        Collecting comtypes==1.1.10
remote:          Downloading comtypes-1.1.10.tar.gz (145 kB)
remote:        Collecting decorator==5.0.7
remote:          Downloading decorator-5.0.7-py3-none-any.whl (8.8 kB)
remote:        Collecting defusedxml==0.7.1
remote:          Downloading defusedxml-0.7.1-py2.py3-none-any.whl (25 kB)
remote:        Collecting deprecation==2.1.0
remote:          Downloading deprecation-2.1.0-py2.py3-none-any.whl (11 kB)
remote:        Collecting entrypoints==0.3
remote:          Downloading entrypoints-0.3-py2.py3-none-any.whl (11 kB)
remote:        Collecting idna==2.10
remote:          Downloading idna-2.10-py2.py3-none-any.whl (58 kB)
remote:        Collecting ipykernel==5.5.3
remote:          Downloading ipykernel-5.5.3-py3-none-any.whl (120 kB)
remote:        Collecting ipython==7.23.0
remote:          Downloading ipython-7.23.0-py3-none-any.whl (785 kB)
remote:        Collecting ipython-genutils==0.2.0
remote:          Downloading ipython_genutils-0.2.0-py2.py3-none-any.whl (26 kB)
remote:        Collecting jedi==0.18.0
remote:          Downloading jedi-0.18.0-py2.py3-none-any.whl (1.4 MB)
remote:        Collecting Jinja2==2.11.3
remote:          Downloading Jinja2-2.11.3-py2.py3-none-any.whl (125 kB)
remote:        Collecting json5==0.9.5
remote:          Downloading json5-0.9.5-py2.py3-none-any.whl (17 kB)
remote:        Collecting jsonschema==3.2.0
remote:          Downloading jsonschema-3.2.0-py2.py3-none-any.whl (56 kB)
remote:        Collecting MarkupSafe==1.1.1
remote:          Downloading MarkupSafe-1.1.1-cp39-cp39-manylinux2010_x86_64.whl (32 kB)
remote:        Collecting matplotlib-inline==0.1.2
remote:          Downloading matplotlib_inline-0.1.2-py3-none-any.whl (8.2 kB)
remote:        Collecting mistune==0.8.4
remote:          Downloading mistune-0.8.4-py2.py3-none-any.whl (16 kB)
remote:        Collecting nbclassic==0.2.7
remote:          Downloading nbclassic-0.2.7-py3-none-any.whl (18 kB)
remote:        Collecting nbclient==0.5.3
remote:          Downloading nbclient-0.5.3-py3-none-any.whl (82 kB)
remote:        Collecting nbconvert==6.0.7
remote:          Downloading nbconvert-6.0.7-py3-none-any.whl (552 kB)
remote:        Collecting nbformat==5.1.3
remote:          Downloading nbformat-5.1.3-py3-none-any.whl (178 kB)
remote:        Collecting nest-asyncio==1.5.1
remote:          Downloading nest_asyncio-1.5.1-py3-none-any.whl (5.0 kB)
remote:        Collecting notebook==6.3.0
remote:          Downloading notebook-6.3.0-py3-none-any.whl (9.5 MB)
remote:        Collecting packaging==20.9
remote:          Downloading packaging-20.9-py2.py3-none-any.whl (40 kB)
remote:        Collecting parso==0.8.2
remote:          Downloading parso-0.8.2-py2.py3-none-any.whl (94 kB)
remote:        Collecting pickleshare==0.7.5
remote:          Downloading pickleshare-0.7.5-py2.py3-none-any.whl (6.9 kB)
remote:        Collecting prometheus-client==0.10.1
remote:          Downloading prometheus_client-0.10.1-py2.py3-none-any.whl (55 kB)
remote:        Collecting prompt-toolkit==3.0.18
remote:          Downloading prompt_toolkit-3.0.18-py3-none-any.whl (367 kB)
remote:        Collecting pycparser==2.20
remote:          Downloading pycparser-2.20-py2.py3-none-any.whl (112 kB)
remote:        Collecting Pygments==2.9.0
remote:          Downloading Pygments-2.9.0-py3-none-any.whl (1.0 MB)
remote:        Collecting pyparsing==2.4.7
remote:          Downloading pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
remote:        Collecting pypiwin32==223
remote:          Downloading pypiwin32-223-py3-none-any.whl (1.7 kB)
remote:        Collecting pyrsistent==0.17.3
remote:          Downloading pyrsistent-0.17.3.tar.gz (106 kB)
remote:        Collecting python-dateutil==2.8.1
remote:          Downloading python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
remote:        Collecting pytz==2021.1
remote:          Downloading pytz-2021.1-py2.py3-none-any.whl (510 kB)
remote:        Collecting pywinpty==1.0.1
remote:          Downloading pywinpty-1.0.1.tar.gz (47 kB)
remote:          Installing build dependencies: started
remote:          Installing build dependencies: finished with status 'done'
remote:          Getting requirements to build wheel: started
remote:          Getting requirements to build wheel: finished with status 'done'
remote:            Preparing wheel metadata: started
remote:            Preparing wheel metadata: finished with status 'error'
remote:            ERROR: Command errored out with exit status 1:
remote:             command: /app/.heroku/python/bin/python /app/.heroku/python/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpr_08fbxd
remote:                 cwd: /tmp/pip-install-0_jtyszs/pywinpty
remote:            Complete output (6 lines):
remote:            Checking for Rust toolchain...
remote:
remote:            Cargo, the Rust package manager, is not installed or is not on PATH.
remote:            This package requires Rust and Cargo to compile extensions. Install it through
remote:            the system's package manager or via https://rustup.rs/
remote:
remote:            ----------------------------------------
remote:        ERROR: Command errored out with exit status 1: /app/.heroku/python/bin/python /app/.heroku/python/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpr_08fbxd 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 isgd-requests-app.

我没有得到确切的错误在哪里,我确实重新安装了rust数据包管理器,但错误仍然显示,任何帮助都将不胜感激。依赖性是由MSVC带来的。 这个包裹

PyWinpty允许创建Windows进程并与之通信 通过控制台输入和输出管道接收输入和打印输出。 PyWinpty支持本机ConPTY接口和上一个, 回退winpty库

然后它就不需要在Ubuntu的堆栈上了


requirements.txt
中删除
pywinpty
应该会有所帮助。

日志显示您需要安装Cargo。Cargo已安装,但它仍然显示您不需要在机器上安装Rust和Cargo。您需要通过依赖项在Heroku上安装它们。无论如何,这不是Git或Python的问题。是的,heroku已经安装了,但我还是得到了相同的结果issue@sunny9495所以可能需要提供什么来检测rust buildpack,但是在heroku上安装
pywinpty
很奇怪,不安装可能更简单?该公司还表示,它需要的MSVC不会在heroku上运行。MSVC也安装了@mpromonet,我重新安装了heroku,rust,但仍然显示相同的情况。@sunny9495:我说的是heroku云平台,而不是你的电脑。heroku云平台使用ubuntu,你的电脑在windows下运行(我猜是从你的回答)。你有没有尝试从requirements.txt中删除pywinpty,你曾将其推送到heroku云平台?它成功了,伙计。非常感谢mpromonet的帮助