My system is macOS and I have both python 2 and 3 installed. I am currently working on a side project for which I want to use Django 1.8 and python 3.4.
I have created a virtual environment with the python 3 command pyvenv venv
in the parent folder of my project (I prefer to have my python project folders to be self contained).
At the moment, I cannot get Emacs to recognise and therefore limit all code related assist to the virtual environment.
In addition, is it possible to setup per-project settings such that I can have different projects use different python versions and environment? The ideal scenario will be, when I change into a project directory and start Emacs, it will pick all it's environment settings from that project directory according to some local settings file.
pyvenv
andvirtualevn
, which I'm familiar with, but can't you just bindpython-shell-virtualenv-root
to the right path? Either via a file variables or dir variables. E.g.# -*- python-shell-virtualenv-root: "../env" -*-
. If this does not work withpyvenv
please fill a bug report,M-x report-emacs-bug
.