Ошибка неподдерживаемой версии Python в центре разработки Azure - PullRequest
1 голос
/ 03 июля 2019

Я пытаюсь получить хосты веб-сайта Django в Azure, которые я создаю в Visual Studio. Я могу опубликовать его и получить выделенный URL-адрес, однако для правильной загрузки сайта мне нужно загрузить свой код в Azure.

Итак, во вкладке центра разработки я попытался создать проект dev ops для чтения, я также попытался загрузить его через репозиторий GitHub, и в обоих вариантах я получаю сообщение об ошибке, что запущена неподдерживаемая версия python.

Я выполнил команды в своем локальном проекте, чтобы увидеть, какие версии я использую, а именно:

Python - 3.7.3

Джанго - 2,1

пункт - 19.1.1

Command: "D:\home\site\deployments\tools\deploy.cmd"
Handling python deployment.
Creating app_offline.htm
KuduSync.NET from: 'D:\home\site\repository' to: 'D:\home\site\wwwroot'
Deleting app_offline.htm
Detected requirements.txt.  You can skip Python specific steps with a .skipPythonDeployment file.
Detecting Python runtime from site configuration
Detected python-2.7
Found compatible virtual environment.
Pip install requirements.
Downloading/unpacking django>=2.1.6,<3.0 (from -r requirements.txt (line 1))
  Running setup.py (path:D:\home\site\wwwroot\env\build\django\setup.py) egg_info for package django

    ==========================
    Unsupported Python version
    ==========================

    This version of Django requires Python 3.5, but you're trying to
    install it on Python 2.7.

    This may be because you are using a version of pip that doesn't
    understand the python_requires classifier. Make sure you
    have pip >= 9.0 and setuptools >= 24.2, then try again:

        $ python -m pip install --upgrade pip setuptools
        $ python -m pip install django

    This will install the latest version of Django which works on your
    version of Python. If you can't upgrade your pip (or Python), request
    an older version of Django:

        $ python -m pip install "django<2"
    Complete output from command python setup.py egg_info:


==========================

Unsupported Python version

==========================



This version of Django requires Python 3.5, but you're trying to

install it on Python 2.7.



This may be because you are using a version of pip that doesn't

understand the python_requires classifier. Make sure you

have pip >= 9.0 and setuptools >= 24.2, then try again:



    $ python -m pip install --upgrade pip setuptools

    $ python -m pip install django



This will install the latest version of Django which works on your

version of Python. If you can't upgrade your pip (or Python), request

an older version of Django:



    $ python -m pip install "django<2"

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in D:\home\site\wwwroot\env\build\django
Storing debug log for failure in D:\home\pip\pip.log
An error has occurred during web site deployment.
\r\nD:\Program Files (x86)\SiteExtensions\Kudu\82.10503.3890\bin\Scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd"
...