i have set python virtual environment pyenv on linux create django project in pydev 1 of these virtual environments. however, cannot figure out how locate virtual environment, since running which python
in virtual environment gives me generic /home/rbu/.pyenv/shims/python
.
first find virtualenv directory with
pyenv prefix <venv-name>
the python executable of virtualenv should <path>/<to>/<venv>/bin/python
.
now set new interpreter in eclipse preferences>pydev>interpreters>python interpreter using location of executable , adequate name. after can start new django project via file>new>project>pydev>pydev django project. choose predefined interpreter.
the django project should work inside virtualenv. installing new packages easiest activate virtualenv in terminal pyenv activate <venv-name>
, pip install package.
Comments
Post a Comment