`pyenv which command` doesn't append the command to the bin path inside a virtualenv
clovis-dugue opened this issue · comments
Problem
When using pyenv which command
inside of a virtualenv with --system-site-packages
, the outputted path is the bin path, without the command itself appended to it
Reproduce
Using black (but will work with any command)
# --- Global version:
pyenv install 3.10.4
pyenv global 3.10.4
pyenv version
# 3.10.4 (set by /home/cdugue/.pyenv/version)
pip install black
pyenv which black
# /home/username/.pyenv/versions/3.10.4/bin/black
# --- Virtualenv:
pyenv virtualenv --system-site-packages my-virtualenv
pyenv activate my-virtualenv
pyenv version
# my-virtualenv (set by PYENV_VERSION environment variable)
pyenv which black
# /home/username/.pyenv/versions/3.10.4/bin/
Description
- Platform information: Ubuntu Linux 20.04
- OS architecture: amd64
- pyenv version: 2.3.0
- Python version: 3.10.4
- C Compiler information: gcc 9.4.0
After further research, this issue has been raised back in January here: #418
Duplicate of #418