user1832478
user1832478

Reputation: 559

Command Error: python.exe can't open file

I am trying the Google App Engine tutorial to make mobile assistant app using Eclipse. I am at the part where I have to try upload data to my local server. I am currently using Cygwin. However I am getting this error:

C:\Python27\python.exe: can't open file '/cygdrive/c/Program Files (x86)/Google/google_appengine/appcfg.py': [Errno 2] No such file or directory upload_data.sh: line 3: --config_file: command not found upload_data.sh: line 4: [email protected]: command not found

I have no idea why this error is happening.

Thanks.

Upvotes: 0

Views: 4346

Answers (1)

Raydel Miranda
Raydel Miranda

Reputation: 14360

Since the explanation is a bit large to put it into a comment I will post it as answer.

First of all:

Try run your program using the python interpreter of your Cygwin distro. it seems GAE it's installed there.

if not the case, well ...

Try to add GAE to the python path.

Your code is trying to reach /cygdrive/c/Program Files (x86)/Google/google_appengine/appcfg.py this is surely due to an

import appcfg

that's why you need /cygdrive/c/Program Files (x86)/Google/google_appengine/ to be added to the PYTHONPATH.

For accomplish that you can:

Add GAE to PYTHONPATH adding to your code:

import sys
sys.path.insert(0, "/cygdrive/c/Program Files (x86)/Google/google_appengine/")

at some point before all GAE stuff began to be imported.

or you can use your python site.py file. This file must be located at: C:\Python27\Lib\site.py.

Open this file and read its content, there are a huge comment there which explain what and how you must proceed.

Upvotes: 1

Related Questions