-
Notifications
You must be signed in to change notification settings - Fork 51
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
Incorrect Windows path to conda.exe after #57 #59
Comments
I think this is because of some recent changes to conda--get-path-prefix. In particular it was made to default to the 'bin' folder even on windows. On my end I've managed to fix it by overriding the function to use the (with-eval-after-load 'conda
(defun conda--get-path-prefix (env-dir)
"Get a platform-specific path string to utilize the conda env in ENV-DIR.
It's platform specific in that it uses the platform's native path separator."
(s-trim
(with-output-to-string
(with-current-buffer standard-output
(let* ((conda-executable-path
(concat (file-name-as-directory conda-anaconda-home) (file-name-as-directory conda-env-executables-dir) "conda"))
(command "\"%s\" ..activate \"%s\" \"%s\"")
(formatted-command (format command
conda-executable-path
(if (eq system-type 'windows-nt)
"cmd.exe"
"bash")
env-dir))
(return-code (process-file shell-file-name nil '(t nil) nil shell-command-switch formatted-command)))
(unless (= 0 return-code)
(error (format "Error: executing command \"%s\" produced error code %d" formatted-command return-code))))))))) I've made a pull request #60 with these changes. |
Thanks! I'll give it a try as soon as it ends up on melpa. |
Closed by #60 |
@notuntoward can you confirm if the latest version on Melpa (which I've confirmed matches the most recent commit to |
Yes, it works for me. Thanks. |
On my Windows machine, Anaconda has installed conda.exe in:
but since #57, the conda package looks for it in:
Or so it seems, if I look at the error message emacs gives me when I try to activate an environment named "stdso":
Before #57, I think that the conda package looked in my PATH environment variable for a conda.exe, which worked correctly.
I have set both
conda-env-home-directory
andconda-anaconda-home
to:The text was updated successfully, but these errors were encountered: