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
When trying to create a virtualenv, I get the following result:
$ virtualenv -p python2.7 tmp -vvv --with-traceback44 setup logging to NOTSET [DEBUG report:43]59 find interpreter for spec PythonSpec(implementation=CPython, major=2, minor=7) [INFO builtin:62]59 proposed PythonInfo(spec=CPython3.9.6.final.0-64, exe=/usr/bin/python, platform=linux, version='3.9.6 (default, Jun 30 2021, 10:22:16) \n[GCC 11.1.0]', encoding_fs_io=utf-8-utf-8) [INFO builtin:69]59 discover PATH[0]=/home/ronan/.local/bin [DEBUG builtin:114]59 filesystem is case-sensitive [DEBUG info:28]60 discover PATH[1]=/usr/local/sbin [DEBUG builtin:114]60 discover PATH[2]=/usr/local/bin [DEBUG builtin:114]60 discover PATH[3]=/usr/bin [DEBUG builtin:114]60 discover PATH[4]=/var/lib/flatpak/exports/bin [DEBUG builtin:114]60 discover PATH[5]=/usr/lib/jvm/default/bin [DEBUG builtin:114]60 discover PATH[6]=/usr/bin/site_perl [DEBUG builtin:114]60 discover PATH[7]=/usr/bin/vendor_perl [DEBUG builtin:114]61 discover PATH[8]=/usr/bin/core_perl [DEBUG builtin:114]Traceback (most recent call last): File "/usr/bin/virtualenv", line 33, in <module> sys.exit(load_entry_point('virtualenv==20.7.0', 'console_scripts', 'virtualenv')()) File "/usr/lib/python3.9/site-packages/virtualenv/__main__.py", line 65, in run_with_catch run(args, options, env) File "/usr/lib/python3.9/site-packages/virtualenv/__main__.py", line 18, in run session = cli_run(args, options, env) File "/usr/lib/python3.9/site-packages/virtualenv/run/__init__.py", line 30, in cli_run of_session = session_via_cli(args, options, setup_logging, env) File "/usr/lib/python3.9/site-packages/virtualenv/run/__init__.py", line 48, in session_via_cli parser, elements = build_parser(args, options, setup_logging, env) File "/usr/lib/python3.9/site-packages/virtualenv/run/__init__.py", line 72, in build_parser raise RuntimeError("failed to find interpreter for {}".format(discover))RuntimeError: failed to find interpreter for Builtin discover of python_spec='python2.7'
I see something similar has been reported and addressed in #1643/#1910, but distutils is available on my installation and I get the error regardless. Some more info:
$ head -1 /etc/os-releaseNAME="Arch Linux"
$ pacman -Qo python virtualenv/usr/bin/python is owned by python 3.9.6-1/usr/bin/virtualenv is owned by python-virtualenv 20.7.0-1
$ python -c 'import disutils; print(distutils.__file__)'| pacman -Qo -/usr/lib/python3.9/distutils/__init__.py is owned by python 3.9.6-1
The behavior is the same for every python version I tested, with the exception of 3.9.6 which the only version installed on my machine.
The text was updated successfully, but these errors were encountered:
As detailed by https://virtualenv.pypa.io/en/latest/user_guide.html#creators virtualenv out of the box is only able to create virtual environments for python versions that are already installed globally on your OS. So it's working as expected. If you'd like to create python2.7 environment you need to install first python27
When trying to create a virtualenv, I get the following result:
I see something similar has been reported and addressed in #1643/#1910, but distutils is available on my installation and I get the error regardless. Some more info:
The behavior is the same for every python version I tested, with the exception of 3.9.6 which the only version installed on my machine.
The text was updated successfully, but these errors were encountered: