-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
The Issue about :CondaChangeEnv #43
Comments
I am not sure what is that problem, but I would start by removing this part
from the section delimited by the
I would then run |
Thanks for your help, but I still get confused. Because I have a lot of virtual envs in Anaconda, in order to make command "CondaChangeEnv" work, what types of pathroot should I use? base or env I created? |
What is the output |
Actually I am newplayer of shell and vim, I write the config file in ~/.config/nvim/init.vim, Did the solution you proposed mean this way? call plug#begin() Plug 'octol/vim-cpp-enhanced-highlight' Plug 'cjrh/vim-conda' call plug#end() |
No worries, we have been all beginners :) I dare to give you a small suggestion given your beginner state: earning vim takes LOT of time (at some point you will ask yourself if that was worth) and many of the information you need you can find in the Back to the problem, what I meant is this:
Next, run the command I wrote above and let us know the outcome. |
when I rewrite the config file in ~/.config/nvim/init.vim, like this: call plug#begin() when I recommnad <sudo nvim ~/.config/nvim/init.vim>, there's an error: Then, I check this command , I do have a python env in </Users/gaohaitao/opt/anaconda3/bin/python> it seems that the config file didn't work. I still have a question:"Whether the functions of the config files vimrc and init.vim are the same" |
I am not sure but you need
Check also the other commands I gave you. |
I'll try your solution. It is embrassed for me that i need to take some time. When I finish them, I'll give you feedback. Thank for your help very much!!! |
Don't be embarassed. It takes time for everyone. It is actually when you rush that things won't work and frustrate you. ;-) Good luck! |
It is normal, macosx is shipped with vim by default, but that is not super good since it misses lots of features. Otherwise, consider Macvim. ;-) Or, if you want to revert back to neovim to use stuff like |
Thanks for your help, I really excited that I succeed just now. I summarize two points that maybe helpful to other beginners. |
No worries :) Just a final note: I have no idea what pyvim is, but it is not a good idea to install stuff in the |
ok, if I have the better solution, I'll leave another message |
https://github.com/ubaldot/vim-conda-activate |
Thanks for the mention but that is an undergoing work. It has a major bug that perhaps it is solved by setting the sys.path but I have to figure out how in vimscript. |
Ok, I found some time and I completed the plugin. https://github.com/ubaldot/vim-conda-activate Being very new, it may contain bugs. I have tested only on OSX, but I am confident that it should work on other OS:s as well. Thanks to @cjrh that paved the way! :) |
oh, great work, I'll willing to test it in my win laptop. |
Hi @ubaldot vim-conda-activate looks great! If you would like to add a PR here to mention it in my README, that would perfectly fine by me. I haven't made meaningful changes in vim-conda for many years so it's good that you have continued the work 👍🏼
|
Ok, I'll fix that. |
Thanks for you greate work. But I have a problem when I write the configuration file of nvim.
My computer is Mac OS M1
My config file is :
call plug#begin()
Plug 'octol/vim-cpp-enhanced-highlight'
" 安装和启用插件
" vim-conda:用于集成 Anaconda
Plug 'cjrh/vim-conda'
let g:python3_host_prog = expand("/Users/gaohaitao/opt/anaconda3/envs/pytorch/bin/python")
let g:conda_python3_executable = expand("/Users/gaohaitao/opt/anaconda3/envs/traffic/bin/python")
let g:conda_executable = expand('/Users/gaohaitao/opt/anaconda3/bin/conda')
" 设置CondaChangeEnv命令为自动加载
augroup conda_autogroup
autocmd!
autocmd VimEnter * CondaChangeEnv
augroup END
call plug#end()
But appear the ERROR:
处理 VimEnter 自动命令 "*"..function 8_CondaChangeEnv[2]..provider#python3#Call 时发生错误:
第 18 行:
Error invoking 'python_execute' on channel 3 (python3-script-host):
Traceback (most recent call last):
File "", line 1, in
File "/Users/gaohaitao/.local/share/nvim/plugged/vim-conda/plugin/vimconda.py", line 361, in conda_change_env
envs = get_envs()
File "/Users/gaohaitao/.local/share/nvim/plugged/vim-conda/plugin/vimconda.py", line 187, in get_envs
envs = get_conda_info_dict()["envs"]
File "/Users/gaohaitao/.local/share/nvim/plugged/vim-conda/plugin/vimconda.py", line 242, in get_conda_info_dict
output = vim_conda_runshell(conda_exe + " info --json")
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
I have tried a lot of methods but they didn't work. Could you help me?
The text was updated successfully, but these errors were encountered: