Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/339.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

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 由于requirements.txt中出现问题,Heroku中的部署失败_Python_Heroku_Pip_Anaconda_Requirements.txt - Fatal编程技术网

Python 由于requirements.txt中出现问题,Heroku中的部署失败

Python 由于requirements.txt中出现问题,Heroku中的部署失败,python,heroku,pip,anaconda,requirements.txt,Python,Heroku,Pip,Anaconda,Requirements.txt,我正在尝试在heroku上部署我的flask应用程序。我正在使用Conda,并使用命令“pip freeze>requirements.txt”生成requirements.txt文件。但是当我将代码推送到heroku git时,它总是显示requirements.txt错误。我还注意到我的requirements.txt有点奇怪。请帮我解决这个问题 这是我的Requirements.txt文件: argon2-cffi @ file:///D:/bld/argon2-cffi_15966300

我正在尝试在heroku上部署我的flask应用程序。我正在使用Conda,并使用命令“pip freeze>requirements.txt”生成requirements.txt文件。但是当我将代码推送到heroku git时,它总是显示requirements.txt错误。我还注意到我的requirements.txt有点奇怪。请帮我解决这个问题

这是我的Requirements.txt文件:

argon2-cffi @ file:///D:/bld/argon2-cffi_1596630042503/work
attrs==19.3.0
backcall @ file:///home/conda/feedstock_root/build_artifacts/backcall_1592338393461/work
backports.functools-lru-cache==1.6.1
bleach @ file:///home/conda/feedstock_root/build_artifacts/bleach_1588608214987/work
brotlipy==0.7.0
certifi==2020.6.20
cffi @ file:///D:/bld/cffi_1595805794566/work
chardet==3.0.4
chart-studio==1.1.0
click==7.1.2
colorama==0.4.3
colorlover==0.3.0
cryptography @ file:///D:/bld/cryptography_1595349005639/work
cufflinks==0.17.3
dash @ file:///home/conda/feedstock_root/build_artifacts/dash_1596870105808/work
dash-core-components @ file:///home/conda/feedstock_root/build_artifacts/dash-core-components_1596203643601/work
dash-html-components==1.0.3
dash-renderer @ file:///home/conda/feedstock_root/build_artifacts/dash-renderer_1596203647496/work
dash-table @ file:///home/conda/feedstock_root/build_artifacts/dash-table_1596867885662/work
decorator==4.4.2
defusedxml==0.6.0
entrypoints==0.3
Flask==1.1.2
Flask-Compress==1.5.0
future==0.18.2
gunicorn==20.0.4
idna @ file:///home/conda/feedstock_root/build_artifacts/idna_1593328102638/work
importlib-metadata @ file:///D:/bld/importlib-metadata_1593211580034/work
ipykernel @ file:///D:/bld/ipykernel_1595447084845/work/dist/ipykernel-5.3.4-py3-none-any.whl
ipython @ file:///D:/bld/ipython_1596256504166/work
ipython-genutils==0.2.0
ipywidgets==7.5.1
itsdangerous==1.1.0
jedi==0.15.2
Jinja2==2.11.2
jsonschema==3.2.0
jupyter-client @ file:///home/conda/feedstock_root/build_artifacts/jupyter_client_1594732094290/work
jupyter-core==4.6.3
MarkupSafe==1.1.1
mistune==0.8.4
nbconvert==5.6.1
nbformat @ file:///home/conda/feedstock_root/build_artifacts/nbformat_1594060262917/work
notebook @ file:///D:/bld/notebook_1596502711596/work
numpy @ file:///D:/bld/numpy_1595523081734/work
packaging @ file:///home/conda/feedstock_root/build_artifacts/packaging_1589925210001/work
pandas @ file:///D:/bld/pandas_1595958702229/work
pandocfilters==1.4.2
parso @ file:///home/conda/feedstock_root/build_artifacts/parso_1596584577899/work
pickleshare==0.7.5
plotly==4.9.0
prometheus-client @ file:///home/conda/feedstock_root/build_artifacts/prometheus_client_1590412252446/work
prompt-toolkit @ file:///home/conda/feedstock_root/build_artifacts/prompt-toolkit_1592500439797/work
pycparser @ file:///home/conda/feedstock_root/build_artifacts/pycparser_1593275161868/work
Pygments==2.6.1
pyOpenSSL==19.1.0
pyparsing==2.4.7
pyrsistent==0.16.0
PySocks==1.7.1
python-dateutil==2.8.1
pytz==2020.1
pywin32==227
pywinpty==0.5.7
PyYAML==5.3.1
pyzmq==19.0.2
requests @ file:///home/conda/feedstock_root/build_artifacts/requests_1592425495151/work
retrying==1.3.3
Send2Trash==1.5.0
six==1.15.0
terminado==0.8.3
testpath==0.4.4
tornado==6.0.4
traitlets==4.3.3
urllib3 @ file:///home/conda/feedstock_root/build_artifacts/urllib3_1595434816409/work
wcwidth @ file:///home/conda/feedstock_root/build_artifacts/wcwidth_1595859607677/work
webencodings==0.5.1
Werkzeug==1.0.1
widgetsnbextension @ file:///D:/bld/widgetsnbextension_1594164609360/work
win-inet-pton==1.1.0
wincertstore==0.2
zipp==3.1.0
现在错误显示为:

ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/D:/bld/argon2-cffi_1596630042503

我不确定,但你可以试试这个:

conda list-e>requirements.txt

这里还有一个康达文档的链接
我在部署到heroku时遇到了同样的问题。尝试:

pip列表——格式=freeze>requirements.txt


在这里找到答案:

它有助于删除requirements.txt文件中的奇怪功能,但是,它以不同的方式引发了一个类似的错误。谢谢你,这解决了我在heroku上的问题,我也注意到了这一点,因为它引发了一个不同的错误,它导致pip freeze在某些行上出现了一个奇怪的拼写错误。我必须仔细查看我的requirements.txt文件,我做到了,同样的错误仍然会在我身上出现,你还做了什么?