Open number5 opened 5 years ago
same issue, anyone can fix this?
Similar issue, but working very strange for me. I have conda installed in two places on my system, but only one is on the path. Yet, somehow the python interpreter from the other install is being set as the default. This is not the interpreter that running python
will launch (again, not on my path) and so I'm not even sure how coc-python (or vscode-python) is finding it.
I'd advocate for the default behavior being to use whatever interpreter is in front on the path.
Edit: Actually looks like the rules are defined here:
Though I'm still not sure why mine was being selected this way. I don't have an interpreter in my coc-settings.json
files and I don't have a workspace set up (no .vscode
directory where I'm working). Seems to point to either a bad interpreter being cached (does the cache persist across closing/opening nvim?) or maybe a poor setting for the globally preferred interpreter (where is this defined?)
I would also prefer if coc-python would use the interpreter of the currently activated conda environment. Maybe a setting could be useful which could be set to define if one prefers the conda-interpreter or the interpreter which is set by coc.
Duplicated with https://github.com/neoclide/coc-python/issues/55
Expected:
What happened:
Steps to reproduce:
conda create coc-bug python=3.4
conda activate coc-bug
neovim test.py
CoCStatus showing the system python instead of the python 3.4 from the envPossible related https://github.com/microsoft/vscode-python/issues/4434