pyvenv icon indicating copy to clipboard operation
pyvenv copied to clipboard

Use `pyvenv` with `pyenv`.

Open hongyi-zhao opened this issue 4 years ago • 1 comments

I'm on Ubuntu 20.04.2 LTS, and use pyenv and pyenv-virtualenv as the python version manager. Now, I want to use Emacs as my python development environment with the help of your wonderful elpy and pyvenv packages.

But it seems that pyvenv is mainly designed to work with virtualenv directly in principle, and not compatible with the commands comes from pyenv, e.g., the following ones:

$ pyenv help
Usage: pyenv <command> [<args>]

Some useful pyenv commands are:
   activate    Activate virtual environment
   commands    List all available pyenv commands
   deactivate   Deactivate virtual environment
   exec        Run an executable with the selected Python version
   global      Set or show the global Python version(s)
   help        Display help for a command
   hooks       List hook scripts for a given pyenv command
   init        Configure the shell environment for pyenv
   install     Install a Python version using python-build
   local       Set or show the local application-specific Python version(s)
   prefix      Display prefix for a Python version
   rehash      Rehash pyenv shims (run this after installing executables)
   root        Display the root directory where versions and shims are kept
   shell       Set or show the shell-specific Python version
   shims       List existing pyenv shims
   uninstall   Uninstall a specific Python version
   --version   Display the version of pyenv
   version     Show the current Python version(s) and its origin
   version-file   Detect the file that sets the current pyenv version
   version-name   Show the current Python version
   version-origin   Explain how the current Python version is set
   versions    List all Python versions available to pyenv
   virtualenv   Create a Python virtualenv using the pyenv-virtualenv plugin
   virtualenv-delete   Uninstall a specific Python virtualenv
   virtualenv-init   Configure the shell environment for pyenv-virtualenv
   virtualenv-prefix   Display real_prefix for a Python virtualenv version
   virtualenvs   List all Python virtualenvs found in `$PYENV_ROOT/versions/*'.
   whence      List all Python versions that contain the given executable
   which       Display the full path to an executable

See `pyenv help <command>' for information on a specific command.
For full documentation, see: https://github.com/pyenv/pyenv#readme

Any hints for this problem?

Regards, HY

hongyi-zhao avatar Sep 15 '21 05:09 hongyi-zhao

As described here, I have found a feasible solution for the time being based on the currently implemented functions in pyvenv.

hongyi-zhao avatar Sep 29 '21 02:09 hongyi-zhao