You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Virtualenvwrapper was installed using pip install --user virtualenv virtualevnwrapper.
The problem is reading the list of available virtual envs. Below is the code snippet which does this.
(defun pyvenv-virtualenv-list (&optional noerror)
"Prompt the user for a name in $WORKON_HOME.
If NOERROR is set, do not raise an error if WORKON_HOME is not
configured."
(let ((workon-home (pyvenv-workon-home))
(result nil))
(if (not (file-directory-p workon-home))
(when (not noerror)
(error "Can't find a workon home directory, set $WORKON_HOME"))
(dolist (name (directory-files workon-home))
(when (or (file-exists-p (format "%s/%s/bin/activate"
workon-home name))
(file-exists-p (format "%s/%s/bin/python"
workon-home name))
(file-exists-p (format "%s/%s/Scripts/activate.bat"
workon-home name))
(file-exists-p (format "%s/%s/python.exe"
workon-home name)))
(setq result (cons name result))))
(sort result (lambda (a b)
(string-lessp (downcase a)
(downcase b)))))))
As of now the activate script is located in $WORKON_HOME/env_name/local/bin/.
Can be fixed with adding /local in the above codepath.
(defun pyvenv-virtualenv-list (&optional noerror)
"Prompt the user for a name in $WORKON_HOME.
If NOERROR is set, do not raise an error if WORKON_HOME is not
configured."
(let ((workon-home (pyvenv-workon-home))
(result nil))
(if (not (file-directory-p workon-home))
(when (not noerror)
(error "Can't find a workon home directory, set $WORKON_HOME"))
(dolist (name (directory-files workon-home))
(when (or (file-exists-p (format "%s/%s/local/bin/activate"
workon-home name))
(file-exists-p (format "%s/%s/local/bin/python"
workon-home name))
(file-exists-p (format "%s/%s/Scripts/activate.bat"
workon-home name))
(file-exists-p (format "%s/%s/python.exe"
workon-home name)))
(setq result (cons name result))))
(sort result (lambda (a b)
(string-lessp (downcase a)
(downcase b)))))))
The text was updated successfully, but these errors were encountered:
Virtualenvwrapper was installed using
pip install --user virtualenv virtualevnwrapper
.The problem is reading the list of available virtual envs. Below is the code snippet which does this.
As of now the activate script is located in
$WORKON_HOME/env_name/local/bin/
.Can be fixed with adding
/local
in the above codepath.The text was updated successfully, but these errors were encountered: