Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.dir-locals.el works for setting virtualenv on Linux/OSX with Jedi, but not Windows #270

Open
sonictk opened this issue May 24, 2016 · 0 comments

Comments

@sonictk
Copy link

sonictk commented May 24, 2016

Hi:

Been trying to find a solution to this issue but to no avail.

Basically, I'm trying to be able to use Emacs and Jedi for Python completion, but on a project-specific basis.

I've seen some of the scripts out there like kenobi.el and another one which I can't remember the name of, but I also saw a note about just having to make a .dir-locals.el file with the following code in it:

((nil . ((python-shell-virtualenv-path . "/home/yliangsiew/Scripts/venv"))))

Which works great on OSX/Linux! I get my completions going and everything. However, on Windows, this doesn't seem to work; if I check the value of jedI:server-args, it seems correct (where the --virtual-env does point to my virtual environment on Windows), but I can't get any completions from that virtual environment, and it still seems to be catching packages even from my system Python that are not in the virtual environment.

The only way I have managed to actually get Jedi on Windows to add paths to packages to be used for completion thus far is setting it manually in my emacs init, like so:

  (setq jedi:server-args
      '("--sys-path" "C:/Programs/Maya-devkit/win/devkit/other/pymel/extras/completion/py"))

But obviously I don't want to have to do this, since this would be global and no longer project-specific.

Is there any hint of why this .dir-locals.el method would not work on Windows or something I can do to fix it? I've tried using forward/back/escaped slashes pointing to the virtualenv to use in question, and on multiple workstations; it just doesn't seem to work on Windows for some reason.

Would really appreciate any assistance!

@sonictk sonictk changed the title .dir-locals.el works for setting virtualenv on Linux/OSX, but not Windows .dir-locals.el works for setting virtualenv on Linux/OSX with Jedi, but not Windows May 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant