Skip to content
This repository has been archived by the owner on Dec 24, 2020. It is now read-only.

not showing packages installed from conda enviroment #123

Closed
ahmedselim2017 opened this issue Dec 1, 2019 · 7 comments
Closed

not showing packages installed from conda enviroment #123

ahmedselim2017 opened this issue Dec 1, 2019 · 7 comments

Comments

@ahmedselim2017
Copy link

Result from CocInfo

versions

vim version: NVIM v0.4.3
node version: v10.16.3
coc.nvim version: 0.0.74-377c2729b9
term: xterm-256color
platform: linux

Messages

Output channel: Python

Starting Jedi Python language engine.
##########Linting Output - pylint##########
************* Module main
1,0,error,E0401:Unable to import 'pandas' (import-error)


Your code has been rated at -2.50/10 (previous run: -2.50/10, +0.00)

Describe the bug

Coc.nvim says unable to import pandas even if I installed using Conda.

Reproduce the bug

  • Create and activate a new Conda environment with
conda create --name ai-all
conda activate ai-all
  • Install some packages using conda
conda install keras
  • Start Neovim via using normal configs which works without anaconda

  • Import some packages which installed by conda

Screenshots (optional)

sc

@oblitum
Copy link
Member

oblitum commented Dec 1, 2019

I think this issue should have been opened on coc-python instead. Still, did you select the right python environment from :CocCommand python.setInterpreter? I use coc-python with conda without issues.

@chemzqm chemzqm transferred this issue from neoclide/coc.nvim Dec 2, 2019
@DoktorMike
Copy link

I have the same issue and indeed it works when calling :CocCommand python.setInterpreter but to me that seems a little bit silly since the conda environment has already been set before I start nvim. Isn't there a way to make the setInterpreter choose the first python available (which would correspond to the one currently active in conda)?

@oblitum
Copy link
Member

oblitum commented Dec 6, 2019

@DoktorMike this is issue #55.

@astier
Copy link

astier commented Dec 6, 2019

Same issue #89 would be great if coc-python would inherit the environment from the activated conda environment.

@oblitum
Copy link
Member

oblitum commented Dec 7, 2019

I'm not sure what you use for environment auto activation, I use pyenv (that integrates nicely with conda), and for it, auto activation also seems an issue on vscode-python, from which coc-python forked:

@ahmedselim2017
Copy link
Author

ahmedselim2017 commented Dec 7, 2019

I think this issue should have been opened on coc-python instead. Still, did you select the right python environment from :CocCommand python.setInterpreter? I use coc-python with conda without issues.

When I do that I get this error:
[coc.nvim] Jedi error: Cannot call write after a stream was destroyed

Edit: Jedi was not installed in conda environment. When I install Jedi in conda environment everything worked

@oblitum
Copy link
Member

oblitum commented Dec 8, 2019

@ahmedselim2017 please close issue then.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants