Hi Ritesh, let me offer some alternatives in addition to Alexis'
recommendations:

   1. I would avoid using Homebrew for installing the Cloud SDK... we have
   a note at the bottom of the first section of the App Engine install docs
   
<https://cloud.google.com/appengine/docs/standard/python3/setting-up-environment>
   that says, "Avoid using a package manager such as apt or yum to install the
   Cloud SDK." Homebrew is a package manager.
   2. Here are the Cloud SDK recommended installation instructions
   <https://cloud.google.com/sdk/docs/install>
   3. When you called  `dev_appserver.py` above, it looks like it was
   looking for Python 2 which it couldn't find. I'm wondering whether this is
   because: 1) you have an older version of dev_appserver.py that was based on
   python2, or 2) you didn't activate your virtualenv and somehow you were
   calling Apple's Python 2 binary. Anyway, if you reinstall the SDK, you
   shouldn't see this issue again.
   4. The Cloud SDK should be installed in your home directory where
   dev_appserver.py should be available in its bin directory, i.e.,
   ~/google-cloud-sdk/bin/dev_appserver.py
   5. OTOH (on the other hand), since you're no longer using `webapp2` and
   likely using Flask, you should be able to start the development server that
   comes with Flask: `python main.py` should work, esp. if you're using the
   QuickStart sample, making it so you don't have to use dev_appserver.py any
   more.
   6. If you're going to use Datastore w/the App Engine NDB library (Py2)
   back in the day, to run on Py3, you would do a minor migration to the
   *Cloud* NDB library
   
<https://cloud.google.com/appengine/docs/standard/python3/migrating-to-cloud-ndb>
to
   keep the same interface to Datastore you're familiar with.
   7. If instead, you want to use the newer interface to Datastore, you'd
   use the Cloud Datastore client library
   <https://cloud.google.com/datastore> instead of Cloud NDB.
   8. To make things slightly *more* complex, you should know the next
   generation of Datastore has been released, and it had a slight product
   rebrand as Cloud Firestore <http://cloud.google.com/firestore> to
   indicate it has inherited some key features of the Firebase realtime
   database <https://firebase.google.com/docs/database/rtdb-vs-firestore>,
   however storing & querying data w/Firestore is quite different
   <https://cloud.google.com/firestore/docs/quickstart-servers> from
   Datastore, so for the time being & backwards-compatibility for Datastore
   users, developers can choose to run Cloud Firestore in Datastore mode (and
   use the Datastore client library)
   9. If instead you'd prefer to start from scratch with the latest
   hotness, then you can use Cloud Firestore in native mode. Here are
comparisons
   b/w Firestore in native vs Datastore modes
   <https://cloud.google.com/datastore/docs/firestore-or-datastore> to help
   you decide.
   10. The Datastore emulator is now a Java app... read more about it here
   <https://cloud.google.com/datastore/docs/tools/datastore-emulator>

Anyway, hope some of this helps!
--Wesley


On Thu, Aug 13, 2020 at 12:34 PM 'Alexis (Google Cloud Platform Support)'
via Google App Engine <google-appengine@googlegroups.com> wrote:

> Hello Ritesh,
>
> I looked in our internal issues and I did not find this error posted. It
> could be a new one. However, a quick Google search shows that someone
> here[1] downgraded to an older version of the SDK and it worked. Older
> versions of the SDK can be found here[2].
>
> If it does work with an older version, it could mean that there is an
> issue. And we would need to report that in the issue tracker here[3], under
> "Cloud SDK issues". However, there are many other possibilities (too many
> not visible) and it would be good to isolate further without brew, etc..
> Just for testing under which environment/config this happens.
>
> If you could, please let us know if it works with an older version of
> Cloud SDK and under which specific environment. Otherwise, this may need to
> be a support ticket. Thank you in advance.
>
> [1]
> https://www.reddit.com/r/googlecloud/comments/gdndx4/gcloud_sdk_update_from_28900_to_29000_on_mac/
> [2] https://cloud.google.com/sdk/docs/downloads-versioned-archives#archive
> [3] https://cloud.google.com/support/docs/issue-trackers
>
> On Wednesday, August 12, 2020 at 6:37:14 AM UTC-4, Ritesh Nadhani wrote:
>>
>> Hello
>>
>> I am getting back to GAE after many years. Things have definitely
>> changed. As a new project, I got started with Python 37 runtime. My
>> virtualenv is created using: python3 -m venv ENV and thus does not have
>> python2.
>>
>> When I try to run my app in local mode using dev_appserver.py (i am just
>> trying to play around with the sample app from the documentation), I get:
>>
>> dev_appserver.py app.yaml
>> ERROR: (dev_appserver) python2: command not found
>>
>> I installed google-cloud-sdk using brew with: brew cask install
>> google-cloud-sdk.
>>
>> As of now, my only requirement for my app is GAE and datastore and I am
>> hoping to be able to use the datastore emulator with the above.
>>
>> Ritesh
>>
>
-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"A computer never does what you want... only what you tell it."
    wesley chun :: @wescpy <http://twitter.com/wescpy> :: Software
Architect & Engineer
    Developer Advocate at Google Cloud by day; at night...
    Python training & consulting : http://CyberwebConsulting.com
    "Core Python" books : http://CorePython.com
    Python blog: http://wescpy.blogspot.com

-- 
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 google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/CAB6eaA6V40dOWEfWSDfqh7vbbzpM%3Dpx9jZKg8QUMLqusdYA7fQ%40mail.gmail.com.

Reply via email to