Open barikata1984 opened 1 week ago
Just an additional info. When I run echo $CONDA_PREFIX
on a normal terminal, it returns my miniconda location like /home/USER/miniconda3
. But when I run it on a VenvSelect-ed terminal, it returns nothing, or maybe an empty string. From this observation, the base miniconda env would not be loaded correctly. I hope this observation rings a bell inside someone's mind.
Okay, after running
conda config --set auto_activate_base false
, the warning disappears. Obviously, it does not activate thebase
env automatically. It works in my use case, but I want to keep this issue open for a while because I am unsure whether this is an expected behaviour.
I see one important change you need to do however - for your own searches using miniconda, try to add type = "anaconda"
as the second parameter under your command for a search. See here in the default search for anaconda venvs how it should look like:
https://github.com/linux-cultist/venv-selector.nvim/blob/regexp/lua/venv-selector/config.lua
This is how the plugin knows it should set CONDA_PREFIX and that's why it's missing for you inside a terminal launched from inside neovim.
Thanks for the detailed issue!
I haven't tried the plugin with miniconda myself, but I'm a bit surprised it doesn't just work, like it does with anaconda. So the issue is because miniconda wants to activate the base environment also every time you activate another venv?
@linux-cultist
In my understanding, it is more due to the conflict between the base and another env; when conda config --set auto_activate_base true
, conda tries to activate the base env at the time of a shell spawned while this plugin also tries to activate another env. This simultaneous env activation would get conda or the shell unsure about which env label should be sent to the console output, which is the problematic process mentioned in the warning.
Something curious is such env activation did not cause such a warning with main
branch afaik
Btw, I made a fork repo to auto-load miniconda link. I can make a PR but adjusting the format is somewhat tedious. Tell me you need the PR or not and what type of lua
format I should follow
Would be nice with a PR of course. I can fix the formatting after it's been merged so you can focus on the code.
Or just link to whatever special things in the code you did to get it to work properly. :) I'm on vacation right now but I will look at this in a few weeks!
I made a PR #152. Pls check it. I thought adding some note about conda config --set auto_activate_base true
but have not been sure where I should put it. Let me know where I should put it if necessary
Hi all,
I am using this plugin to autoload miniconda envs per project. I notice that there is a new
regexp
branch and it is recommended to move to that branch. So I did it. After following this instruction on #117, I believe that I could notice this plugin of the location of miniconda envs and actually I can set a virtual env per project. But, when I activate a terminal with this plugin, I get the following warning message now although I haven't have it with themain
branch:At first glance, it is raised by either
powerlevel10k
orconda
. But this warning only appears on a project to which a virtual env is registered with this plugin. The message also appears when I call a built-in terminal with:terminal
. l believe that how an interactive shell is called by this plugin, or byneovim
, would be somewhat different from calling the shell from a terminal app (in my casewezterm
), which would trigger the warning. Does anybody come up with an idea to clear the warning without just suppressing it?Below is my plugin config:
and my
.zshrc
just in case bcoz it is referred to in the message (export
s are noted on.zprofile
).Thanks in advance!