错误:由于环境错误而无法安装软件包:[Errno 2] 没有这样的文件或目录:'/C:/ci/astroid_1592481955828/work'

Ngw*_*ous 2 python heroku

我正在尝试将一个小 python 项目推送到 Heroku,但每次运行时我都会收到此错误git push heroku master

$ git push heroku master
Enumerating objects: 19, done.
Counting objects: 100% (19/19), done.
Delta compression using up to 4 threads
Compressing objects: 100% (14/14), done.
Writing objects: 100% (19/19), 4.27 KiB | 728.00 KiB/s, done.
Total 19 (delta 2), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: -----> Installing python-3.6.10
remote: -----> Installing pip
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote:        Processing /C:/ci/astroid_1592481955828/work
remote:        ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/C:/ci/astroid_1592481955828/work'
remote:
remote:  !     Push rejected, failed to compile Python app.
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to flask-plan-app.
remote:
To https://git.heroku.com/flask-plan-app.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/flask-plan-app.git'
Run Code Online (Sandbox Code Playgroud)

我也尝试在笔记本电脑上找到丢失的文件,但找不到,请问如何解决此问题?

这是我的requirement.txt 文件

astroid @ file:C:/ci/astroid_1592481955828/work
certifi==2020.6.20
click==7.1.2
colorama==0.4.3
Flask==1.1.2
Flask-SQLAlchemy==2.4.3
gunicorn==20.0.4
isort==4.3.21
itsdangerous==1.1.0
Jinja2==2.11.2
lazy-object-proxy==1.4.3
MarkupSafe==1.1.1
mccabe==0.6.1
pylint @ file:///C:/ci/pylint_1592487534522/work
six==1.15.0
SQLAlchemy==1.3.18
toml @ file:///tmp/build/80754af9/toml_1592853716807/work
typed-ast==1.4.1
Werkzeug==1.0.1
wincertstore==0.2
wrapt==1.11.2
Run Code Online (Sandbox Code Playgroud)

小智 12

我是一个初学者,所以对此持保留态度。

我删除了需求文件中的所有“@ paths”后缀,只保留了包的名称,这阻止了此错误的发生。

所以:

astroid 
certifi==2020.6.20
click==7.1.2
colorama==0.4.3
Flask==1.1.2
Flask-SQLAlchemy==2.4.3
gunicorn==20.0.4
isort==4.3.21
itsdangerous==1.1.0
Jinja2==2.11.2
lazy-object-proxy==1.4.3
MarkupSafe==1.1.1
mccabe==0.6.1
pylint 
six==1.15.0
SQLAlchemy==1.3.18
toml 
typed-ast==1.4.1
Werkzeug==1.0.1
wincertstore==0.2
wrapt==1.11.2
Run Code Online (Sandbox Code Playgroud)