0

I am on Arch Linux and use anaconda-mode with company-anaconda (here is a minimal init.el with which I can replicate the issue). I have Python installed both at root level from the primary package manager (pacman) and locally through Anaconda ~/anaconda3.

When I use no environment, company works well giving me suggestions. On the other hand, when I do conda-env-activate and switch to the base conda environment (or any other environment), company stops giving any suggestion. With company-diag I see "Completions: none(error fetching)". I still get suggestions when running IPython in inferior mode, but I see that company uses company-capf as a backend in that case, as opposed to company-anaconda.

I am a noob with both Emacs and Anaconda, and have been trying to fix this for a while. My first thought was that company-anaconda could have been relying on some Python package not available in the conda environment which I am not aware of, thus falling back to the root installation for that specific package and causing issues, but I have no idea if that is a realistic explanation.

  • Note that anaconda-mode has nothing to do with conda . anaconda mode uses pyenv to manage environments and not conda. – mmmmmm Sep 27 '21 at 12:31
  • @mmmmmm yes. That is why I also use the conda.el package to deal with conda environments. The issue was apparently caused by incompatibilities between the jedi version used by anaconda-mode and the default versions used by anaconda. – richardvandesorge Sep 27 '21 at 16:01

1 Answers1

0

I solved the issue by creating a new conda environment and installing jedi-0.18.0, parso-0.8.2, and service_factory-0.1.6, which are the versions which appear as compatible with anaconda-mode, along with python-3.9.7. With this environment company works well. To see the versions I checked the file anaconda-mode.py located in the folder .emacs.d/elpa/anaconda-mode/.

Actually, anaconda-mode installs those packages itself in .emacs.d/anaconda-mode/0.1.14-py3/ so maybe the issue is caused by an incompatibility of those versions with the python version used by the default Anaconda installation.