I want to use pip to install new packages and they say to install pip in a virtualenv . I did that and installed some packages and use them no problem.
But I have a problem setting up the simple google app engine helloworld app under PyDev using python2.7. I set it up to use C:\\Python27\\env\\Scripts\\python.exe. But running it gave an error that it couldn't import pdb .
Running the virtualenv python from the cmd line and calling 'import pdb' gave no errors. And typing pdb echoed: module 'pdb' from 'C:\\Python27\\lib\\pdb.py' . So from the cmd line, it could find pdb in the root lib dir. The debug out from appengine said it was using the virtualenv python. I made sure that I had C:\\Python27\\lib in the System PYTHONPATH when setting up the PyDev interpreter, but this did not matter. Strange. (I also have C:\\Python27\\DLLs and C:\\Python27\\lib\\lib-tk).
So I tried using the root python exe as the interpreter and it works fine. No problem with pdb, so my code is correct. But now it can't find the modules I added using pip in the virtualenv.
It seems there are 3 options for setting this up correctly:
I hope someone who has gone through this before can give some advice as to the best way to proceed with the least amount of problems later.
I did some research on the google-appengine-python group and they say to go with option 3: Don't listen to the pip advice when using it with google appengine. appengine does not play nice with virtualenv.
Refs:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.