Closed zhangfelix closed 3 years ago
I tried pyvenv
, and it works.
I add (require-package 'pyvenv)
into init-local.el.
Use M-x pyvenv-activate
to specify the virtual environment directory. After that, Python Shell, pdb and flycheck use the same environment.
Maybe It is batter to add pyvenv
into default configuration.
Thanks for filing this. I don't think I want to prescribe how people should manage their python virtual envs, and locally I use poetry
, nix
and direnv
instead of pyvenv
etc.
You're right, this is more like a special use case. Just record it in case others encounter the same problem.
I've updated the note in init-python.el
at least. :-)
I'm working in a mac(apple m1). I used
M-x pythonic-activate RET /path/to/virtualenv RET
to change the virtual environment in anaconda-mode. But Python Shell, pdb and flycheck use three different environments.It works fine when I used
C-c C-p
, in a Python Shell.But the pdb(
python -m pdb test.py
) use the python2.7 from the system.While the flycheck use python from homebrew.