Vasanth Nag K V
Vasanth Nag K V

Reputation: 4988

Linking Conda's virtual environment to Eclipse

i want to use conda's virtual environment for running my python scripts but anyway i will be using eclipse only to write the scripts.. is there a away that i can link eclipse to the virtual environment? so when i run scripts on eclipse , it will actually run in the virtual environment i have already created??

a question similar to my concern was found here

Eclipse unable to get info on the interpreter in virtual environment

but i did not understand the answer given to this one Appreciate any help on this. thanks in advance !

Upvotes: 0

Views: 6954

Answers (1)

Leszek Gajecki
Leszek Gajecki

Reputation: 31

In anaconda directories there is envs directory with subdirectories for each environment you created. The structure ( libs ...) are similar like directly in anaconda directory.

In PyDev: Window-> Preferences : PyDev->Interpreters->Python interpreter then clik "Browse for python/pypy exe" - the locate interpreter in bin directory of environment for example:

 <ANACONDA_DIR>/envs/<ENV_NAME/bin/python

then "Apply" and (after few minutes of configuration) right now your interpreter is available at Debug Configurations. By the way at Preferences-> PyDev->Interpreters->Python (window as above) you can see at "Packages" tab the list of your packages and their version

I found that environments are directories: https://conda.io/projects/conda/en/latest/user-guide/concepts/environments.html#list-all-environments

Upvotes: 1

Related Questions