Skip to content

setup-env is looking in limited places for pyenv-virtualenv #243

Closed
@arcsector

Description

@arcsector

🐛 Summary

./setup-env script needs to look for pyenv-virtualenv in all places it's setup to be detected, not just the MacOS location.

To reproduce

Steps to reproduce the behavior:

  1. Install pyenv and pyenv-virtualenv on WSL2 as described in https://github.com/pyenv/pyenv and https://github.com/pyenv/pyenv-virtualenv, installing pyenv-virtualenv as a plugin as the docs describe
  2. Place necessary configs in ~/.bashrc and reload shell
  3. Attempt to run ./setup-env
  4. Observe the check for pyenv-virtualenv failing, even though one can run pyenv virtualenvs with a space just fine

Expected behavior

The check needs to detect the pyenv-virtualenv binary in the correct directory or check for the existence of pyenv virtualenv with a space instead. The easiest way to do this would be to check in the locations that pyenv-virtualenv describes to install it:

  1. $(pyenv root)/bin
  2. $(pyenv root)/plugins/pyenv-virtualenv/bin

You could also detail that users may need to symlink or otherwise add the plugin's bin to their path in their bashrc:

echo "export PATH="$PATH:$HOME/.pyenv/plugins/pyenv-virtualenv/bin" >> ~/.bashrc

Any helpful log output or screenshots

Output of setup-env test before adding to path:

> command -v pyenv-virtualenv

>

Output of setup-env test after adding to path:

> command -v pyenv-virtualenv
/home/user/.pyenv/plugins/pyenv-virtualenv/bin/pyenv-virtualenv

Metadata

Metadata

Assignees

No one assigned

    Labels

    improvementThis issue or pull request will add or improve functionality, maintainability, or ease of use

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions