emacs-traad icon indicating copy to clipboard operation
emacs-traad copied to clipboard

emacs-traad does not work with conda environments

Open mhlr opened this issue 6 years ago • 4 comments

I use conda for mananging my python installation and environments. in my ,emacs.d/init.el I have

(require 'traad)
(setq traad-environment-name "base")

When I run M-x traad-install-server I get

Debugger entered--Lisp error: (error "Invalid virtualenv base specified!")
  signal(error ("Invalid virtualenv base specified!"))
  error("Invalid virtualenv base specified!")
  venv-workon("base")
  venv-with-virtualenv-shell-command("base" "pip install --upgrade traad")
  traad-install-server()
  funcall-interactively(traad-install-server)
  #<subr call-interactively>(traad-install-server record nil)
  apply(#<subr call-interactively> traad-install-server (record nil))
  call-interactively@ido-cr+-record-current-command(#<subr call-interactively> traad-install-server record nil)
  apply(call-interactively@ido-cr+-record-current-command #<subr call-interactively> (traad-install-server record nil))
  call-interactively(traad-install-server record nil)
  command-execute(traad-install-server record)
  execute-extended-command(nil "traad-install-server")

base is the default conda environment

mhlr avatar Jul 31 '18 00:07 mhlr

We use virtualenvwrapper.el to manage virtual environments, and from what I can tell it doesn't support conda.

Instead of using traad-environment-name, you might be able to instead set traad-server-program. I don't know enough about conda to know if this will actually work or, if it will, what exactly to set it to.

abingham avatar Jul 31 '18 12:07 abingham

I'm open to supporting both virtual environments and conda, though I'm not inclined to do that work myself. It looks like there are Emacs packages to help with that.

abingham avatar Jul 31 '18 12:07 abingham

Ran into this setting up emacs-traad and setting the traad-server-program explicitly seems to be doing the trick

Anntoin avatar Aug 09 '18 23:08 Anntoin

@mhlr Does this work for you?

abingham avatar Aug 11 '18 13:08 abingham