Reputation: 1027
I have Python2.7
installed and Python3.5
installed on my windows machine.These are at locations C:\Python27 and C:\Python35-32. Both these are added in System Path environment variables and can be accessed from any directory.
Now i create a virtualenv
in Python35-32 directory successfully under a sub-directory CODING_LABS.
I try to link/point my Eclipse python interpreter to the python.exe
file contained in CODING_LABS. This is done OK.
However, when i run my script from eclipse,it still points to Python27.Unable to figure out why?
Upvotes: 1
Views: 1551
Reputation: 25342
Not sure... by default, any run will get the 'default' interpreter (which is the first interpreter in Preferences > PyDev > Interpreters > Python interpreter -- you may reorder those using the up/down button in that screen).
Now, that's the default, you may also configure to use a different interpreter per project (select project > alt+Enter for its properties > PyDev - Interpreter/Grammar > Interpreter).
Or you can choose a different one per launch: Menu > Run > Run Configurations > Select launch > Interpreter.
Also, you may want to double check to make sure that the paths in the interpreter configuration window (Preferences > PyDev > Interpreters > Python interpreter > select interpreter) actually map to the proper site-packages/external libs you expect.
Upvotes: 2