简体   繁体   中英

Why is Eclipse reporting Interpreter not found when using an anaconda environment with pydev?

I have installed anaconda with python 3.6 but I need to use tensorflow for an assignment I am working on. That means using python 3.5.

I have set up a new environment in anaconda with python 3.5 and everything runs fine from command line but when I try to run in eclipse, if I select the python 3.5 executable, (window --> preferences --> pydev --> interpreter). I get the following when I attempt to run.

在此处输入图片说明

I am using pydev with eclipse Neon.

Using Auto-Config for 'python interpreters' selection works fine except it does not find the new environment and reverts to python 3.6.

Browsing to the 3.5 executable actually accepts the executable and seems to recognise the packages.

在此处输入图片说明

However, why I try to run I get the interpreter not found error even though I have just listed it.

Any ideas?

The problem is that you previously had an interpreter named python (you can change the name of your interpreter by double-clicking it in the preferences), and you have either associated that python interpreter to the project or run configuration, so, when it's running, it's looking for an interpreter named python and failed to find it.

The solution is either renaming your current interpreter to python or going to the project/run configuration and changing the association to either use the Default configured interpreter or associating it with the new interpreter by its new name.

As a note, unless you're in some company which uses pre-defined custom configurations, the recommended approach is always using the default interpreter.

Go to Windows --> preferences --> python Interpreter --> quick auto config --> apply`. Follow the Below Image

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM