emacsorphanage / company-jedi

Company backend for Python jedi
101 stars 12 forks source link

not recognizing virtualenv? #19

Closed vimsucks closed 7 years ago

vimsucks commented 7 years ago

I'm using virtualenvwrapper.el After venv-workon a venv, it still attemping to complete the global site-packages, but not the packages in the virtualenv

related config:

;;; Virtualenvwrapper:
(require 'virtualenvwrapper)
(venv-initialize-eshell)
(venv-initialize-interactive-shells)
(setq-default mode-line-format (cons '(:exec venv-current-name) mode-line-format))

;;; Company
(require 'company)
(add-hook 'after-init-hook 'global-company-mode)
(require 'company-jedi)
(setq company-show-numbers 1)
(setq company-minimum-prefix-length 2)
(require 'jedi-core)
(company-quickhelp-mode 1)
(add-hook 'python-mode-hook (lambda () (add-to-list 'company-backends 'company-jedi)))
(add-hook 'python-mode-hook 'jedi:setup)
(setq jedi:tooltip-method nil)
syohex commented 7 years ago

Could you remove ~/.emacs.d/.python-environments and retry ?

kuanyui commented 7 years ago

I also has same problem. How to make company-jedi run under project's venv?

syohex commented 7 years ago

How to make company-jedi run under project's venv?

(Sorry I don't understand python programming well)