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

RuntimeError: No virtualenv implementation for PythonInfo #2234

Closed
NikelChamp opened this issue Nov 16, 2021 · 4 comments
Closed

RuntimeError: No virtualenv implementation for PythonInfo #2234

NikelChamp opened this issue Nov 16, 2021 · 4 comments
Labels

Comments

@NikelChamp
Copy link

NikelChamp commented Nov 16, 2021

Issue

I got this situation when I run the command mkvirtualenv -p python2 env27. But mkvirualenv -p python3 env38 is ok.

Environment

Provide at least:

  • OS: MacOS Big Sur 11.6

  • pip list of the host python where virtualenv is installed:

     virtualenv                                  20.10.0    
     virtualenv-clone                       0.5.7      
     virtualenvwrapper                    4.8.4 

Output of the virtual environment creation

Make sure to run the creation with -vvv --with-traceback:

  File "/Library/Python/2.7/site-packages/virtualenv/__main__.py", line 18, in run
    session = cli_run(args, options, env)
  File "/Library/Python/2.7/site-packages/virtualenv/run/__init__.py", line 30, in cli_run
    of_session = session_via_cli(args, options, setup_logging, env)
  File "/Library/Python/2.7/site-packages/virtualenv/run/__init__.py", line 48, in session_via_cli
    parser, elements = build_parser(args, options, setup_logging, env)
  File "/Library/Python/2.7/site-packages/virtualenv/run/__init__.py", line 74, in build_parser
    CreatorSelector(interpreter, parser),
  File "/Library/Python/2.7/site-packages/virtualenv/run/plugin/creators.py", line 15, in __init__
    creators, self.key_to_meta, self.describe, self.builtin_key = self.for_interpreter(interpreter)
  File "/Library/Python/2.7/site-packages/virtualenv/run/plugin/creators.py", line 43, in for_interpreter
    raise RuntimeError("No virtualenv implementation for {}".format(interpreter))
@NikelChamp NikelChamp added the bug label Nov 16, 2021
@gaborbernat
Copy link
Contributor

The error message seems clear enough for me, the python flavour you're targeting is not supported by virtualenv. See https://virtualenv.pypa.io/en/latest/installation.html#python-and-os-compatibility

@ghost
Copy link

ghost commented Dec 9, 2021

Hi @gaborbernat, I'm actually having the same issue on macOS Monterey (12.0.1) on Apple M1.

Traceback (most recent call last):
File "/opt/homebrew/bin/virtualenv", line 8, in
sys.exit(run_with_catch())
File "/opt/homebrew/lib/python3.9/site-packages/virtualenv/main.py", line 65, in run_with_catch
run(args, options, env)
File "/opt/homebrew/lib/python3.9/site-packages/virtualenv/main.py", line 18, in run
session = cli_run(args, options, env)
File "/opt/homebrew/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 "/opt/homebrew/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 "/opt/homebrew/lib/python3.9/site-packages/virtualenv/run/init.py", line 74, in build_parser
CreatorSelector(interpreter, parser),
File "/opt/homebrew/lib/python3.9/site-packages/virtualenv/run/plugin/creators.py", line 15, in init
creators, self.key_to_meta, self.describe, self.builtin_key = self.for_interpreter(interpreter)
File "/opt/homebrew/lib/python3.9/site-packages/virtualenv/run/plugin/creators.py", line 43, in for_interpreter
raise RuntimeError("No virtualenv implementation for {}".format(interpreter))
RuntimeError: No virtualenv implementation for PythonInfo(spec=CPython2.7.18.final.0-64, system=/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python, exe=/usr/bin/python2, platform=darwin, version='2.7.18 (default, Oct 2 2021, 04:20:38) \n[GCC Apple LLVM 13.0.0 (clang-1300.0.29.1) [+internal-os, ptrauth-isa=deploymen', encoding_fs_io=utf-8-None)

It's seemingly the same issue for me as #1694. Is it something on my side, could be the same bug?

I'm running virtualenv 20.10.0 from /opt/homebrew/lib/python3.9/site-packages/virtualenv/__init__.py

@gaborbernat
Copy link
Contributor

We don't support M1 macOS with python2.7 - see #2233

@ghost
Copy link

ghost commented Dec 9, 2021

Oh, thank you Gábor! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants