Skip to content

Add pyenv-win support #4525

Closed
Closed
@Cellorator

Description

I tried making a virtual environment with:
pipenv --python 3.8.6

It asked me this:

Warning: Python 3.8.6 was not found on your system...
Would you like us to install CPython 3.8.6 with Pyenv? [Y/n]:

in which I said yes, but it threw me these errors:

Traceback (most recent call last):
  File "c:\users\carl\.pyenv\pyenv-win\versions\3.9.0\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\carl\.pyenv\pyenv-win\versions\3.9.0\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\Carl\.pyenv\pyenv-win\versions\3.9.0\Scripts\pipenv.exe\__main__.py", line 7, in <module>
  File "C:\Users\Carl\.pyenv\pyenv-win\versions\3.9.0\Lib\site-packages\pipenv\vendor\click\core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\Carl\.pyenv\pyenv-win\versions\3.9.0\Lib\site-packages\pipenv\vendor\click\core.py", line 782, in main
    rv = self.invoke(ctx)
  File "C:\Users\Carl\.pyenv\pyenv-win\versions\3.9.0\Lib\site-packages\pipenv\vendor\click\core.py", line 1236, in invoke
    return Command.invoke(self, ctx)
  File "C:\Users\Carl\.pyenv\pyenv-win\versions\3.9.0\Lib\site-packages\pipenv\vendor\click\core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\Carl\.pyenv\pyenv-win\versions\3.9.0\Lib\site-packages\pipenv\vendor\click\core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "C:\Users\Carl\.pyenv\pyenv-win\versions\3.9.0\Lib\site-packages\pipenv\vendor\click\decorators.py", line 73, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "C:\Users\Carl\.pyenv\pyenv-win\versions\3.9.0\Lib\site-packages\pipenv\vendor\click\core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "C:\Users\Carl\.pyenv\pyenv-win\versions\3.9.0\Lib\site-packages\pipenv\vendor\click\decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "c:\users\carl\.pyenv\pyenv-win\versions\3.9.0\lib\site-packages\pipenv\cli\command.py", line 198, in cli
    ensure_project(
  File "c:\users\carl\.pyenv\pyenv-win\versions\3.9.0\lib\site-packages\pipenv\core.py", line 576, in ensure_project
    ensure_virtualenv(
  File "c:\users\carl\.pyenv\pyenv-win\versions\3.9.0\lib\site-packages\pipenv\core.py", line 498, in ensure_virtualenv
    python = ensure_python(three=three, python=python)
  File "c:\users\carl\.pyenv\pyenv-win\versions\3.9.0\lib\site-packages\pipenv\core.py", line 451, in ensure_python
    c = installer.install(version)
  File "c:\users\carl\.pyenv\pyenv-win\versions\3.9.0\lib\site-packages\pipenv\installers.py", line 191, in install
    c = self._run(
  File "c:\users\carl\.pyenv\pyenv-win\versions\3.9.0\lib\site-packages\pipenv\installers.py", line 124, in _run
    c = delegator.run(args, block=False, timeout=timeout)
  File "c:\users\carl\.pyenv\pyenv-win\versions\3.9.0\lib\site-packages\pipenv\vendor\delegator.py", line 336, in run
    c.run(block=block, binary=binary, cwd=cwd, env=env)
  File "c:\users\carl\.pyenv\pyenv-win\versions\3.9.0\lib\site-packages\pipenv\vendor\delegator.py", line 204, in run
    s = PopenSpawn(self._popen_args, **pexpect_kwargs)
  File "c:\users\carl\.pyenv\pyenv-win\versions\3.9.0\lib\site-packages\pipenv\vendor\pexpect\popen_spawn.py", line 53, in __init__
    self.proc = subprocess.Popen(cmd, **kwargs)
  File "c:\users\carl\.pyenv\pyenv-win\versions\3.9.0\lib\subprocess.py", line 947, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "c:\users\carl\.pyenv\pyenv-win\versions\3.9.0\lib\subprocess.py", line 1416, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
OSError: [WinError 193] %1 is not a valid Win32 application

Pipenv Version: 2020.11.4
Pyenv-Win Version: 2.64.3
Python Version: 3.9.0

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions