2019-03-24
emacs 中使用 pyls 出现的问题解决
2019-03-24 ~ 2022-07-24

第一个问题

描述

  • 在使用 pyenv 时,无法正确确定 python 版本

原因

  • PATH 环境变量没有正确包含 ~/.pyenv/bin

解决方法

  • 添加正确的环境变量
1
  add-to-list 'exec-path "~/.pyenv/shims")
  • 使用 exec-path-from-shell , 其配置
1
2
3
(when (memq window-system '(mac ns x))
  (use-package exec-path-from-shell
    :init (exec-path-from-shell-initialize)))