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
Normally, sysconfig._get_default_scheme() will return {base}/bin which then help us getting the right pyenv python location.
However, in my local ubuntu 16.04 (probably it is because I'm using system built-in python version) and also in windows subsystem for linux, sysconfig._get_default_scheme() returns {base}/local/bin which makes getting pyenv python location as ~/.pyenv/versions/some_version/local/bin. This path does not exist apparently.
This make latest pipenv can not find the pyenv python version and raise following error.
➜ test pipenv --python 3.6.3
Traceback (most recent call last):
File "/usr/local/bin/pipenv", line 11, in <module>
load_entry_point('pipenv', 'console_scripts', 'pipenv')()
File "/home/user/Documents/dev/pipenv/pipenv/vendor/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/user/Documents/dev/pipenv/pipenv/vendor/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/user/Documents/dev/pipenv/pipenv/vendor/click/core.py", line 1114, in invoke
return Command.invoke(self, ctx)
File "/home/user/Documents/dev/pipenv/pipenv/vendor/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/user/Documents/dev/pipenv/pipenv/vendor/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/user/Documents/dev/pipenv/pipenv/vendor/click/decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/home/user/Documents/dev/pipenv/pipenv/vendor/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/user/Documents/dev/pipenv/pipenv/vendor/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/user/Documents/dev/pipenv/pipenv/cli/command.py", line 203, in cli
clear=state.clear,
File "/home/user/Documents/dev/pipenv/pipenv/core.py", line 595, in ensure_project
pypi_mirror=pypi_mirror,
File "/home/user/Documents/dev/pipenv/pipenv/core.py", line 537, in ensure_virtualenv
ensure_python(three=three, python=python)
File "/home/user/Documents/dev/pipenv/pipenv/core.py", line 421, in ensure_python
path_to_python = find_a_system_python(python)
File "/home/user/Documents/dev/pipenv/pipenv/core.py", line 384, in find_a_system_python
python_entry = finder.find_python_version(line)
File "/home/user/Documents/dev/pipenv/pipenv/vendor/backports/functools_lru_cache.py", line 137, in wrapper
result = user_function(*args, **kwds)
File "/home/user/Documents/dev/pipenv/pipenv/vendor/pythonfinder/pythonfinder.py", line 112, in find_python_version
return self.system_path.find_python_version(
File "/home/user/Documents/dev/pipenv/pipenv/vendor/pythonfinder/pythonfinder.py", line 53, in system_path
ignore_unsupported=self.ignore_unsupported,
File "/home/user/Documents/dev/pipenv/pipenv/vendor/pythonfinder/models/path.py", line 395, in create
ignore_unsupported=ignore_unsupported,
File "<attrs generated init 8b5e681b06af133646fcafad5a215f2a935c5776>", line 37, in __init__
File "/home/user/Documents/dev/pipenv/pipenv/vendor/pythonfinder/models/path.py", line 107, in __attrs_post_init__
self._setup_pyenv()
File "/home/user/Documents/dev/pipenv/pipenv/vendor/pythonfinder/models/path.py", line 139, in _setup_pyenv
root=PYENV_ROOT, ignore_unsupported=self.ignore_unsupported
File "/home/user/Documents/dev/pipenv/pipenv/vendor/pythonfinder/models/pyenv.py", line 128, in create
return cls(root=root, ignore_unsupported=ignore_unsupported)
File "<attrs generated init ad2b651619e57cf5a5c544e22e7f046f4487c68e>", line 19, in __init__
File "/home/user/Documents/dev/pipenv/pipenv/vendor/pythonfinder/models/pyenv.py", line 122, in get_pythons
pythons.update(p.pythons)
AttributeError: 'NoneType' object has no attribute 'pythons'
How about let's pin the _get_default_scheme to posix_prefix?
The text was updated successfully, but these errors were encountered:
Pyenv will install python to
~/.pyenv/versions/some_version/bin
. The binary directory is got bypythonfinder/src/pythonfinder/models/pyenv.py
Line 74 in 2b0530a
Normally,
sysconfig._get_default_scheme()
will return{base}/bin
which then help us getting the right pyenv python location.However, in my local ubuntu 16.04 (probably it is because I'm using system built-in python version) and also in windows subsystem for linux,
sysconfig._get_default_scheme()
returns{base}/local/bin
which makes getting pyenv python location as~/.pyenv/versions/some_version/local/bin
. This path does not exist apparently.This make latest pipenv can not find the pyenv python version and raise following error.
How about let's pin the
_get_default_scheme
toposix_prefix
?The text was updated successfully, but these errors were encountered: