2018-06-04 18:42:15 -05:00
|
|
|
;;; lang/python/autoload/conda.el -*- lexical-binding: t; -*-
|
2022-08-12 20:29:19 +02:00
|
|
|
;;;###if (modulep! +conda)
|
2018-06-04 18:42:15 -05:00
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun +python/set-conda-home ()
|
2018-07-17 22:06:16 +02:00
|
|
|
"Set `conda-anaconda-home' (ANACONDA_HOME).
|
|
|
|
|
|
|
|
Usually it's `~/.anaconda3' on local machine, but it can be set to a remote
|
|
|
|
directory using TRAMP syntax, e.g. `/ssh:host:/usr/bin/anaconda3'. This way, you
|
|
|
|
can use a remote conda environment, including the corresponding remote python
|
|
|
|
executable and packages."
|
2018-06-07 01:06:02 +08:00
|
|
|
(interactive)
|
2018-07-17 22:06:16 +02:00
|
|
|
(require 'conda)
|
2019-06-25 21:38:16 +02:00
|
|
|
(when-let (home (read-directory-name "Set conda home: " "~" nil nil conda-anaconda-home))
|
2018-07-17 22:06:16 +02:00
|
|
|
(setq conda-anaconda-home home)
|
|
|
|
(message "Successfully changed conda home to: %s" (abbreviate-file-name home))))
|
2018-06-04 18:42:15 -05:00
|
|
|
|