Google App Engine部署失败。找不到pywin32 == xxx

问题描述 投票:2回答:1
的匹配分布

我已经为我的Django应用程序运行了gcloud app deploy,但是在构建日志末尾它失败并出现以下错误:

Step #1 - "builder": Collecting pywin32==227 (from -r requirements.txt (line 63))
Step #1 - "builder": 
Step #1 - "builder": INFO     `pip_download_wheels` had stderr output:
Step #1 - "builder":   ERROR: Could not find a version that satisfies the requirement pywin32==227 (from -r requirements.txt (line 63)) (from versions: none)
Step #1 - "builder": ERROR: No matching distribution found for pywin32==227 (from -r requirements.txt (line 63))
Step #1 - "builder": 
Step #1 - "builder": ERROR    error: `pip_download_wheels` returned code: 1
Step #1 - "builder": INFO     pip_download_wheels took 13 seconds
Step #1 - "builder": INFO     build process for FTL image took 18 seconds
Step #1 - "builder": INFO     full build took 18 seconds
Step #1 - "builder": ERROR    `pip_download_wheels` had stderr output:
Step #1 - "builder":   ERROR: Could not find a version that satisfies the requirement pywin32==227 (from -r requirements.txt (line 63)) (from versions: none)
Step #1 - "builder": ERROR: No matching distribution found for pywin32==227 (from -r requirements.txt (line 63))
Step #1 - "builder": 
Step #1 - "builder": error: `pip_download_wheels` returned code: 1
Step #1 - "builder": Traceback (most recent call last):
Step #1 - "builder":   File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
Step #1 - "builder":     "__main__", fname, loader, pkg_name)
Step #1 - "builder":   File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
Step #1 - "builder":     exec code in run_globals
Step #1 - "builder":   File "/usr/local/bin/ftl.par/__main__.py", line 65, in <module>
Step #1 - "builder":   File "/usr/local/bin/ftl.par/__main__.py", line 57, in main
Step #1 - "builder":   File "/usr/local/bin/ftl.par/__main__/ftl/common/ftl_error.py", line 58, in UserErrorHandler
Step #1 - "builder": IOError: [Errno 2] No such file or directory: '""/output'
Finished Step #1 - "builder"
ERROR
ERROR: build step 1 "gcr.io/gae-runtimes/python37_app_builder:python37_20200223_3_7_6_RC00" failed: step exited with non-zero status: 1

供参考,我的requirements.txt文件包含在下面:

aioredis==1.3.1
asgiref==3.2.3
astroid==2.3.3
async-timeout==3.0.1
attrs==19.3.0
autobahn==20.1.3
Automat==0.8.0
certifi==2019.11.28
cffi==1.13.2
channels==2.4.0
channels-redis==2.4.1
chardet==3.0.4
Click==7.0
colorama==0.4.3
constantly==15.1.0
cryptography==2.8
daphne==2.4.1
dash==1.8.0
dash-core-components==1.7.0
dash-html-components==1.0.2
dash-renderer==1.2.3
dash-table==4.6.0
Django==3.0.2
django-crispy-forms==1.9.0
django-extensions==2.2.8
django-plotly-dash==1.1.5
django-redis==4.11.0
djangorestframework==3.11.0
docker==4.1.0
dpd-components==0.1.0
Flask==1.1.1
Flask-Compress==1.4.0
future==0.18.2
gunicorn==20.0.4
hiredis==1.0.1
hyperlink==19.0.0
idna==2.8
incremental==17.5.0
isort==4.3.21
itsdangerous==1.1.0
Jinja2==2.11.0
lazy-object-proxy==1.4.3
MarkupSafe==1.1.1
mccabe==0.6.1
msgpack==0.6.2
numpy==1.18.1
pandas==1.0.1
Pillow==7.0.0
plotly==4.5.0
psycopg2==2.8.4
psycopg2-binary==2.8.4
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycparser==2.19
PyHamcrest==2.0.0
pylint==2.4.4
pylint-django==2.0.14
pylint-plugin-utils==0.6
pyOpenSSL==19.1.0
pypiwin32==223
python-dateutil==2.8.1
pytz==2019.3
pywin32==227
redis==3.3.11
requests==2.22.0
retrying==1.3.3
scipy==1.4.1
service-identity==18.1.0
simplejson==3.17.0
six==1.14.0
sqlparse==0.3.0
Twisted==19.10.0
txaio==20.1.1
typed-ast==1.4.1
urllib3==1.25.8
websocket-client==0.57.0
Werkzeug==0.16.1
wincertstore==0.2
wrapt==1.11.2
xlrd==1.2.0
zope.interface==4.7.1

当我根据GitHub上的changelog为python 3.7提供了更大的支持时,我曾尝试将pywin32版本降级到223,但是每次重试都出现了相同的构建日志错误,并替换了版本。

我不太确定到底怎么了。 GCP为什么找不到合适的发行版?

还有可能相关的问题,为什么在最终IOError之前的回溯会在python2.7目录中列出runpy.py文件?我在app.yaml中将运行时python指定为3.7,并且在编写所有内容时都考虑了python3 ...

感谢您的帮助,如果我在这里遗漏了一些明显的东西,对不起。在过去的几个小时里,我一直在动脑筋,无济于事:(

python python-3.x google-app-engine google-cloud-platform
1个回答
4
投票

pywin32程序包仅发布Windows平台的内置发行版(请注意所有win*文件名here)。

您将无法在App Engine上安装它,因为基础平台是Linux,而不是Windows。

© www.soinside.com 2019 - 2024. All rights reserved.