Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix spacemacs importmagic and/or epc not found?

I use spacemacs config to open a python file.

emacs: 25.3.1
spacemacs: 0.300.0
platform: osx

I add python layer in dotspacemacs-configuration-layers, besides I use miniconda to control my python envs with (setenv "WORKON_HOME" "~/miniconda3/envs") in dotspacemacs/user-init.

Then I run into this problem(copy from Messages) when I open a python file:

Importmagic and/or epc not found. importmagic.el will not be working.

Tried to solve this situation from discussion at spacemacs#10145 by add

(require 'pyvenv)
(pyvenv-activate DIRECTORY)

into my dotspacemacs/user-config but with no lucky.

Hope someone could give me some advice, thank you!

like image 698
guerbai Avatar asked Mar 02 '18 08:03

guerbai


3 Answers

Did you

pip3 install importmagic epc 

in the python environment you're working in?

like image 71
Sam Pillsworth Avatar answered Oct 21 '22 01:10

Sam Pillsworth


pip install importmagic epc should work.

If not, check this variable: python-shell-interpreter, this is the python which need to install the packages.

like image 37
Hunger Avatar answered Oct 21 '22 00:10

Hunger


I had the same problem running spacemacs and lsp-mode for python. It turned out that I hadn't activated lsp on that directory / project and it wasn't running.

Once the lsp layer was running again, then the importmagic and epc errors went away.

like image 1
user1026169 Avatar answered Oct 21 '22 00:10

user1026169