1

I am attempting to get a Django website hosts on Azure that I build in Visual Studio. I am able to publish it and get a dedicated URL, however in order to get the site to load properly, I need to load my code to Azure.

So in the development centre tab, I tried creating a dev ops project to read from, I also tried to upload it through the GitHub repo, with both options I get an error that I am running an unsupported version of python.

I ran commands in my local project to see what versions I am using, which are as follows:

Python - 3.7.3

Django - 2.1

pip - 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"
BPDESILVA
  • 2,040
  • 5
  • 15
  • 35
Usian Bolt
  • 43
  • 5

0 Answers0