Closed cemeroncel closed 2 years ago
I'm seeing the same issue on emacs 28.1, miniconda, and I'm on OSX
Could you post the output of the command conda shell.posix+json deactivate $ENVIRONMENT
(where $ENVIRONMENT
is one of your available environments)?
OK. Here you go. Thanks! -Scott
(base) @. ~ % conda activate stats (stats) @. ~ % conda shell.posix+json deactivate stats
ArgumentError: deactivate does not accept arguments remainder_args: ['stats']
But I can do this:
(stats) @.*** ~ % conda shell.posix+json deactivate { "path": { "PATH": [ "/Users/scott/miniconda3/bin", "/Users/scott/miniconda3/condabin", "/usr/local/bin", "/usr/bin", "/bin", "/usr/sbin", "/sbin", "/Library/TeX/texbin", "/opt/X11/bin", "/Library/Apple/usr/bin" ] }, "vars": { "export": { "CONDA_PREFIX": "/Users/scott/miniconda3", "CONDA_SHLVL": 1, "CONDA_DEFAULT_ENV": "base", "CONDA_PROMPT_MODIFIER": "(base) ", "CONDA_EXE": "/Users/scott/miniconda3/bin/conda", "_CE_M": "", "_CE_CONDA": "", "CONDA_PYTHON_EXE": "/Users/scott/miniconda3/bin/python" }, "unset": [ "CONDA_PREFIX_1" ], "set": { "PS1": "(base) " } }, "scripts": { "activate": [], "deactivate": [] } }%
On Sat, Jul 9, 2022 at 11:11 AM Rami Chowdhury @.***> wrote:
Could you post the output of the command conda shell.posix+json deactivate $ENVIRONMENT (where $ENVIRONMENT is one of your available environments)?
— Reply to this email directly, view it on GitHub https://github.com/necaris/conda.el/issues/118#issuecomment-1179575777, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABVTB5BYINM7O55IESOMHTVTGXD3ANCNFSM52ZZBEXQ . You are receiving this because you commented.Message ID: <necaris/conda. @.***>
I've tried the fix where you removed the argument to the deactivate command, but now I get this when I try to deactivate an env.
conda--get-deactivation-parameters: Wrong number of arguments: #[(subcommand env-dir) "
conda-call-json-subcommand is expecting that all commands come with env-dir. Maybe make the env-dir an optional argument so the function can handle the deactivate command?
Sorry I'm not terribly fluent in elisp. I really appreciate this package!
(defun conda--call-json-subcommand (subcommand env-dir) ....
I tried this and it seems to work:
(defun conda--call-json-subcommand (subcommand &optional env-dir) "Call Conda SUBCOMMAND on ENV-DIR returning JSON." (unless env-dir (setq env-dir "")) ....
I’ll try to dig in and check this tonight once the baby is asleep. Thanks! Scott
Sent from my iPhone
On Jul 9, 2022, at 11:11 AM, Rami Chowdhury @.***> wrote:
Could you post the output of the command conda shell.posix+json deactivate $ENVIRONMENT (where $ENVIRONMENT is one of your available environments)?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.
Hello,
I am running Emacs 28.1 with native compilation and Conda 4.13. I have two
conda
environments. The commandconda-env-list
correctly shows them, and I can also activate them withconda-env-activate
. However, when I try to deactivate them usingconda-env-deactivate
I get the following error:conda--call-json-subcommand: could not parse JSON stream: "invalid token near 'ArgumentError'", "<string>", 2, 13, 14
I have
miniconda
instead ofanaconda
if it is related.