Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discover python in a case insensitive way #1624

xavfernandez opened this issue Feb 14, 2020 · 4 comments · Fixed by #1629

Discover python in a case insensitive way #1624

xavfernandez opened this issue Feb 14, 2020 · 4 comments · Fixed by #1629


Copy link

@xavfernandez xavfernandez commented Feb 14, 2020

Thanks your impressive work on the rewrite !

Everything works fine on my part but was actually surprised by:

$ virtualenv20 --version
virtualenv 20.0.3 from /home/xafer/.local/bin/virtualenv20/virtualenv/

$ virtualenv20 -p cpython3.7 test
Traceback (most recent call last):
  File "/usr/lib/python3.8/", line 193, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/", line 86, in _run_code
    exec(code, run_globals)
  File "/home/xafer/.local/bin/virtualenv20/", line 169, in <module>
  File "/home/xafer/.local/bin/virtualenv20/", line 165, in run
  File "/home/xafer/.local/bin/virtualenv20/virtualenv/", line 19, in run
  File "/home/xafer/.local/bin/virtualenv20/virtualenv/run/", line 22, in cli_run
  File "/home/xafer/.local/bin/virtualenv20/virtualenv/run/", line 29, in session_via_cli
  File "/home/xafer/.local/bin/virtualenv20/virtualenv/run/", line 51, in build_parser
RuntimeError: failed to find interpreter for Builtin discover of python_spec='cpython3.7'

$ virtualenv20 -p CPython3.7 test
created virtual environment in 82ms CPython3Posix(dest=/home/xafer/tmp/test, clear=False, global=False) with seeder FromAppData pip=latest setuptools=latest wheel=latest app_data_dir=/home/xafer/.local/share/virtualenv/seed-v1 via=copy

IMHO the interpreter discovery shouldn't consider the case.

Copy link

@gaborbernat gaborbernat commented Feb 14, 2020

@xavfernandez makes sense, feels like an oversight 👍

Copy link

@PrajwalM2212 PrajwalM2212 commented Feb 14, 2020

I would like to work on this.

Copy link

@ssbarnea ssbarnea commented Feb 14, 2020

I think it would be wrong to be case insensitive. Most platforms are case-insensitive. Even MacOS switched to defaulting to case-insensitive in recent years.

If you give a param, you better know what you type.

Copy link

@gaborbernat gaborbernat commented Feb 21, 2020

Hello, a fix for this issue has been released via virtualenv 20.0.5; see ( . Please give a try and report back if your issue has not been addressed; if not, please comment here, and we'll reopen the ticket. We want to apologize for the inconvenience this has caused you and say thanks for having patience while we resolve the unexpected bugs with this new major release.


@pypa pypa locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

Successfully merging a pull request may close this issue.

4 participants