Using "python_version: 3.7" isn't valid, see
https://cloud.google.com/appengine/docs/flexible/python/runtime#interpreter

In addition, the version of pip that you're using in Cloud Shell doesn't
have an effect on the version of pip used when your application is deployed.

On Thu, Sep 10, 2020 at 8:20 AM Bjørn-Jostein Singstad <
[email protected]> wrote:

> I am trying to deploy a Python Flask application on Google Cloud Platform
> (App Engine). The app works fine locally on my computer. I use Tensorflow
> version 2.3.0 in my app. This seems to be a problem when I try to deploy
> the app to Google Cloud Platform. I get this error code in the build log
> when trying to build the app:
>
>
> Collecting tensorflow==2.3.0 (from -r requirements.txt (line 2))
> Step #1:   Could not find a version that satisfies the requirement
> tensorflow==2.3.0 (from -r requirements.txt (line 2)) (from versions:
> 0.12.1, 1.0.0, 1.0.1, 1.1.0rc0, 1.1.0rc1, 1.1.0rc2, 1.1.0
> , 1.2.0rc0, 1.2.0rc1, 1.2.0rc2, 1.2.0, 1.2.1, 1.3.0rc0, 1.3.0rc1,
> 1.3.0rc2, 1.3.0, 1.4.0rc0, 1.4.0rc1, 1.4.0, 1.4.1, 1.5.0rc0, 1.5.0rc1,
> 1.5.0, 1.5.1, 1.6.0rc0, 1.6.0rc1, 1.6.0, 1.7.0rc0, 1.7.0r
> c1, 1.7.0, 1.7.1, 1.8.0rc0, 1.8.0rc1, 1.8.0, 1.9.0rc0, 1.9.0rc1, 1.9.0rc2,
> 1.9.0, 1.10.0rc0, 1.10.0rc1, 1.10.0, 1.10.1, 1.11.0rc0, 1.11.0rc1,
> 1.11.0rc2, 1.11.0, 1.12.0rc0, 1.12.0rc1, 1.12.0rc2,
> 1.12.0, 1.12.2, 1.12.3, 1.13.0rc0, 1.13.0rc1, 1.13.0rc2, 1.13.1, 1.13.2,
> 1.14.0rc0, 1.14.0rc1, 1.14.0, 2.0.0a0, 2.0.0b0, 2.0.0b1)
> Step #1: No matching distribution found for tensorflow==2.3.0 (from -r
> requirements.txt (line 2))
> Step #1: You are using pip version 10.0.1, however version 20.2.3 is
> available.
> Step #1: You should consider upgrading via the 'pip install --upgrade pip'
> command.
> Step #1: The command '/bin/sh -c pip install -r requirements.txt' returned
> a tanon-zero code: 1
> Finished Step #1
> ERROR
> ERROR: build step 1 "
> gcr.io/cloud-builders/docker@sha256:c1128bf8a32cfe4f2efcb920551a71a43d3401d3a3631f8b745e90b75099b68e"
> failed: step exited with non-zero status: 1
> Step #1:
>
>
> In my YAML file i have specified that the app should run on Python 3.7:
>
> entrypoint: "gunicorn -b:$PORT main:app"
> env: flex
> runtime: python
> runtime_config:
>   python_version: 3.7
>
> But for me it seems as python 2.7 also is involved in some way:
>
>  ---> Running in b2db92615defStep #1: Running virtualenv with interpreter
> /opt/python3.7/bin/python3.7Step #1: Using base prefix '/opt/python3.7'Step
> #1: */usr/local/lib/python2.7/dist-packages/virtualenv.py:1041:*
> DeprecationWarning: the imp module is deprecated in favour of importlib;
> see the module's documentation for alternative usesStep #1: import impStep
> #1: New python executable in /env/bin/python3.7Step #1: Also creating
> executable in /env/bin/python
>
> My requirement file looks like this:
> ```
> pip==20.2.3
> tensorflow==2.3.0
> Flask==0.11.1
> gunicorn==19.5.0
> numpy==1.17.4
> scipy==1.4.1
> h5py==2.10.0
> ```
>
>
> I tried to update pip in the Google Cloud Shell before deploying the
> application and it seems to work ok, but when I deploy my app it goes back
> to the old pip version.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-appengine/34417a89-10cc-440b-9821-65cf06d81422n%40googlegroups.com
> <https://groups.google.com/d/msgid/google-appengine/34417a89-10cc-440b-9821-65cf06d81422n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Give me feedback: go/tell-dustin

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/CAEODo7trCZrO5AK7MNZoT70cw7VFKUpAkCZcsZT074-A4Buaiw%40mail.gmail.com.

Reply via email to