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!
Did you
pip3 install importmagic epc
in the python environment you're working in?
pip install importmagic epc
should work.
If not, check this variable: python-shell-interpreter
, this is the python which need to install the packages.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With