0

I installed python and google cloud sdk. I'm trying to use:

dev_appserver.py app.yaml

When I go to my directory with my web app (using cd [directory]) and enter dev_appserver.py app.yaml into the command line nothing happens. The prompt shows the next line in CMD like I didn't enter anything... I indeed have an app.yaml file and this works perfectly on my MacBook running a local server.

I also tried just typing "dev_appserver.py" and hitting enter and again nothing happens... It's as if I were to press enter in the command line without typing anything.

On MacBook when I type dev_appsever.py without pointing to an app.yaml file - it at least shows me all the potential commands associated with dev_appserver.py. Why doesn't the windows command prompt seem to understand this command? Nor tell me it doesn't understand it? Please help!!! I really want to run a local server for cloud engine on my Windows machine, but have no idea what's wrong. I google'd a bunch and haven't found someone else with this issue...

Deniss T.
  • 2,526
  • 9
  • 21
Robbie
  • 563
  • 7
  • 19

2 Answers2

1

Finally solved my issue.... turns out goodle cloud sdk requires python 2.7. I uninstalled python 3.8, installed python 2.7. dev_appserver then didn't run unless I went into the folder where it exists:

user/name/local/google/cloudsdk/bin

And then I run python dev_appserver.py and it works.

I also had to make sure my python command worked by adding it into my path. Python3.8 makes it easy to do via install wizard, but 2.7 requires you to go into your environment vars yourself to add it. This is why my python command originally did nothing.

Not related - but my Blender 2.81 stopped working after this. I found out blender requires Python3. So I installed Python3.8 again and got both cloud sdk and blender working. Took way too many hours to solve this.... damn...

Robbie
  • 563
  • 7
  • 19
0

It is possible that Windows has files with ".py" mapped to something unexpected. I would suggest specifying the full path to the version of Python you want and pass "dev_appserver.py" as a parameter. Like:

c:\python\python.exe dev_appserver.py app.yaml
user212514
  • 3,110
  • 1
  • 15
  • 11
  • I just followed this to make sure my python is in my path (https://stackoverflow.com/questions/58754860/cmd-opens-window-store-when-i-type-python) and now I'm getting the following: python dev_appserver.py app.yaml python: can't open file 'dev_appserver.py': [Errno 2] No such file or directory – Robbie Dec 01 '19 at 02:07
  • also now when i type just 'python' i receive the python prompts... still have no idea why its saying can't open file... there is a file there. 100% certain – Robbie Dec 01 '19 at 02:09
  • when i type just 'dev_appserver.py app.yaml' now - I receive a system error window that says "this file doesn not have an app associated with it for performing this action. Please install an app or, if one is already installed, create an association in the Default App Settings page.". This error prompt also appears if I just type "dev_appserver.py" – Robbie Dec 01 '19 at 02:10
  • I've now also located the dev_appserver.py file and did a right click > open with --and told it to open with python. Now the .py file is using python to my understanding. When I type 'dev_appserver.py" in cmd now - I get "Traceback (most recent last call) ... line 95... assert sys.version_info[0] == 2...AssertionError – Robbie Dec 01 '19 at 02:28
  • looks like it's hitting an error when trying to run the py file... – Robbie Dec 01 '19 at 02:28