Развертывание Django в облаке Google ошибка (проблема pywin32) - PullRequest
0 голосов
/ 20 сентября 2019

Я разработал приложение Django, которое отлично работает локально, но когда я попытался развернуть его в облаке Google, я получил следующую ошибку:

https://files.pythonhosted.org/packages/74/68/d87d9b36af36f44254a8d512cbfc48369103a3b9e474be9bdfe536abfc45/python_dateutil-2.7.5-py2.py3-none-any.whl (225kB)
Step #1 - "builder": Saved /tmp/tmpvTXqe6/wheel/python_dateutil-2.7.5-py2.py3-none-any.whl
Step #1 - "builder": Collecting pytz==2018.7 (from -r requirements.txt (line 57))
Step #1 - "builder": Downloading https://files.pythonhosted.org/packages/f8/0e/2365ddc010afb3d79147f1dd544e5ee24bf4ece58ab99b16fbb465ce6dc0/pytz-2018.7-py2.py3-none-any.whl (506kB)
Step #1 - "builder": Saved /tmp/tmpvTXqe6/wheel/pytz-2018.7-py2.py3-none-any.whl
Step #1 - "builder": Collecting pywin32==224 (from -r requirements.txt (line 58))
Step #1 - "builder":
Step #1 - "builder": INFO `pip_download_wheels` had stderr output:
Step #1 - "builder": Could not find a version that satisfies the requirement pywin32==224 (from -r requirements.txt (line 58)) (from versions: )
Step #1 - "builder": No matching distribution found for pywin32==224 (from -r requirements.txt (line 58))
Step #1 - "builder":
Step #1 - "builder": ERROR error: `pip_download_wheels` returned code: 1
Step #1 - "builder": INFO pip_download_wheels took 21 seconds
Step #1 - "builder": INFO build process for FTL image took 26 seconds
Step #1 - "builder": INFO full build took 26 seconds
Step #1 - "builder": ERROR `pip_download_wheels` had stderr output:
Step #1 - "builder": Could not find a version that satisfies the requirement pywin32==224 (from -r requirements.txt (line 58)) (from versions: )
Step #1 - "builder": No matching distribution found for pywin32==224 (from -r requirements.txt (line 58))
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_20190527_3_7_3_RC00" failed: exit status 1

app.yaml выглядит следующим образом

**

runtime: python37
handlers:
- url: /static
  static_dir: static/
- url: /.*
  script: auto

**

и в конце это требование.txt

altgraph==0.16.1
astroid==2.2.5`
autobahn==19.3.3
backcall==0.1.0
bleach==3.1.0
certifi==2018.10.15
chardet==3.0.4
colorama==0.4.1
cycler==0.10.0
decorator==4.3.0
defusedxml==0.6.0
Django==2.1.7
django-crispy-forms==1.7.2
entrypoints==0.3
future==0.17.1
idna==2.7
ipykernel==5.1.0
ipython==7.4.0
ipython-genutils==0.2.0
ipywidgets==7.4.2
isort==4.3.17
jedi==0.13.3
Jinja2==2.10.1
jsonschema==2.6.0
jupyter==1.0.0
jupyter-client==5.2.4
jupyter-console==6.0.0
jupyter-core==4.4.0
kiwisolver==1.0.1
lazy-object-proxy==1.3.1
macholib==1.11
MarkupSafe==1.1.1
matplotlib==3.0.2
mccabe==0.6.1
mistune==0.8.4
nbconvert==5.4.1
nbformat==4.4.0
notebook==5.7.8
numpy==1.15.4
opencv-python==3.4.3.18
pandocfilters==1.4.2
parso==0.4.0
pefile==2018.8.8
pickleshare==0.7.5
Pillow==6.0.0
plotly==3.4.1
prometheus-client==0.6.0
prompt-toolkit==2.0.9
Pygments==2.3.1
PyInstaller==3.4
pylint==2.3.1
pyparsing==2.3.0
pypiwin32==223
PyQt5==5.11.3
PyQt5-sip==4.19.13
python-dateutil==2.7.5
pytz==2018.7
pywin32==224
pywin32-ctypes==0.2.0
pywinpty==0.5.5
pyzmq==18.0.1
qtconsole==4.4.3
requests==2.20.1
retrying==1.3.3
scipy==1.1.0
Send2Trash==1.5.0
sip==4.19.8
six==1.11.0
sqlparse==0.3.0
terminado==0.8.2
testpath==0.4.2
tornado==6.0.2
traitlets==4.3.2
txaio==18.8.1
typed-ast==1.3.4
urllib3==1.24.1
virtualenv==16.7.5
vpnotebook==0.1.3
vpython==7.5.0
wcwidth==0.1.7
webencodings==0.5.1
widgetsnbextension==3.4.2
wrapt==1.11.1
xrandrl==0.1

Я думаю, что ошибка возникает из требований, но я не знаю, как ее решить.

Дайте, пожалуйста, ваши идеи.Я застрял с этой проблемой в течение двух дней.

1 Ответ

0 голосов
/ 20 сентября 2019

Как вы, вероятно, уже знаете, серверы Google App Engine не работают под управлением Windows, поэтому нет никакого способа использовать API-интерфейс pywin32 и нет идентичного ему эквивалента.Поэтому, во-первых, вам нужно отказаться от использования pywin32, а затем попытаться найти эквивалентные опции библиотек для желаемого варианта использования.

Вы также можете использовать условные требования в своем файле require.txt, чтобы более точно определить, что вы хотите использовать.Более подробную информацию о синтаксисе условных требований к зданию можно найти здесь .

...