2018.11.14 regression: cannot create virtualenv
See original GitHub issueIssue description
Can’t create new virtual environment.
Expected result
Run pipenv --three
, say. Get a new virtual environment.
Actual result
$ pipenv --three --verbose [7/188]
Traceback (most recent call last):
File "/data/developer/.local/bin/pipenv", line 11, in <module>
sys.exit(cli())
File "/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1114, in invoke
return Command.invoke(self, ctx)
File "/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/click/decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/data/developer/.local/lib/python3.6/site-packages/pipenv/cli/command.py", line 203, in cli
clear=state.clear,
File "/data/developer/.local/lib/python3.6/site-packages/pipenv/core.py", line 569, in ensure_project
pypi_mirror=pypi_mirror,
File "/data/developer/.local/lib/python3.6/site-packages/pipenv/core.py", line 511, in ensure_virtualenv
ensure_python(three=three, python=python)
File "/data/developer/.local/lib/python3.6/site-packages/pipenv/core.py", line 397, in ensure_python
path_to_python = find_a_system_python(python)
File "/data/developer/.local/lib/python3.6/site-packages/pipenv/core.py", line 360, in find_a_system_python
python_entry = finder.find_python_version(line)
File "/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/pythonfinder/pythonfinder.py", line 114, in find_python_version
major=major, minor=minor, patch=patch, pre=pre, dev=dev, arch=arch, name=name
File "/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/pythonfinder/models/path.py", line 396, in find_python_version
ver = next(iter(self.get_pythons(sub_finder)), None)
File "/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/pythonfinder/models/path.py", line 279, in get_pythons
reverse=True
File "/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/pythonfinder/models/path.py", line 277, in <genexpr>
(p for p in self._filter_paths(finder) if p.is_python),
File "/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/pythonfinder/models/path.py", line 264, in <genexpr>
pth for pth in unnest(finder(p) for p in self.path_entries if p is not None)
File "/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/pythonfinder/utils.py", line 138, in unnest
for el in target:
File "/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/pythonfinder/models/path.py", line 264, in <genexpr>
pth for pth in unnest(finder(p) for p in self.path_entries if p is not None)
File "/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/pythonfinder/models/mixins.py", line 121, in find_python_version
for child in unnest(self.pythons.values())
File "/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/pythonfinder/models/path.py", line 523, in pythons
for path, entry in self.children.items():
File "/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/cached_property.py", line 35, in __get__
value = obj.__dict__[self.func.__name__] = self.func(obj)
File "/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/pythonfinder/models/path.py", line 494, in children
for child_key, child_val in self._gen_children():
File "/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/pythonfinder/models/path.py", line 487, in _gen_children
yield (child.as_posix(), PathEntry.create(path=child, **pass_args))
File "/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/pythonfinder/models/path.py", line 567, in create
_new = cls(**creation_args)
File "<attrs generated init 81256d6f9278a22b980267a2af2176cbb62c24db>", line 16, in __init__
File "/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/pythonfinder/models/path.py", line 510, in get_py_version
py_version = PythonVersion.from_path(path=self, name=self.name)
File "/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/pythonfinder/models/python.py", line 418, in from_path
instance_dict = cls.parse(py_version.strip())
File "/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/pythonfinder/models/python.py", line 366, in parse
raise ValueError("Not a valid python version: %r" % version)
ValueError: Not a valid python version: <LegacyVersion('Starting installer, one moment...\ndm.c: 1693: not running as root returning empty list\nanaconda argparse: terminal size detection failed, usin
g default width\n[Errno 25] Inappropriate ioctl for device')>
Steps to replicate
pipenv --three
I mean I suppose there’s something about my environment that triggers this - because surely you wouldn’t make a release that simply didn’t work - but I don’t know what it is. 2018.10.13 works fine.
$ pipenv --support [9/285]
$ pipenv --support
Pipenv version: '2018.11.14'
Pipenv location: '/data/developer/.local/lib/python3.6/site-packages/pipenv'
Python location: '/usr/bin/python36'
Python installations found:
Traceback (most recent call last): File “/data/developer/.local/bin/pipenv”, line 11, in <module> sys.exit(cli()) File “/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py”, line 764, in call return self.main(*args, **kwargs) File “/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py”, line 717, in main rv = self.invoke(ctx) File “/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py”, line 1114, in invoke return Command.invoke(self, ctx) File “/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py”, line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File “/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py”, line 555, in invoke return callback(*args, **kwargs) File “/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/click/decorators.py”, line 64, in new_func return ctx.invoke(f, obj, *args, **kwargs) File “/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py”, line 555, in invoke return callback(*args, **kwargs) File “/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/click/decorators.py”, line 17, in new_func return f(get_current_context(), *args, **kwargs) File “/data/developer/.local/lib/python3.6/site-packages/pipenv/cli/command.py”, line 142, in cli get_pipenv_diagnostics() File “/data/developer/.local/lib/python3.6/site-packages/pipenv/help.py”, line 33, in get_pipenv_diagnostics python_paths = finder.find_all_python_versions() File “/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/pythonfinder/pythonfinder.py”, line 136, in find_all_python_versions major=major, minor=minor, patch=patch, pre=pre, dev=dev, arch=arch, name=name File “/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/pythonfinder/models/path.py”, line 328, in find_all_python_versions values = list(self.get_pythons(sub_finder)) File “/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/pythonfinder/models/path.py”, line 279, in get_pythons reverse=True File “/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/pythonfinder/models/path.py”, line 277, in <genexpr> (p for p in self._filter_paths(finder) if p.is_python), File “/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/pythonfinder/models/path.py”, line 264, in <genexpr> pth for pth in unnest(finder(p) for p in self.path_entries if p is not None) File “/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/pythonfinder/utils.py”, line 138, in unnest for el in target: File “/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/pythonfinder/models/path.py”, line 264, in <genexpr> pth for pth in unnest(finder(p) for p in self.path_entries if p is not None) File “/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/pythonfinder/models/mixins.py”, line 76, in find_all_python_versions path_filter = filter(None, (sub_finder(p) for p in self.children.values())) File “/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/cached_property.py”, line 35, in get value = obj.dict[self.func.name] = self.func(obj) File “/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/pythonfinder/models/path.py”, line 494, in children for child_key, child_val in self._gen_children(): File “/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/pythonfinder/models/path.py”, line 487, in _gen_children yield (child.as_posix(), PathEntry.create(path=child, **pass_args)) File “/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/pythonfinder/models/path.py”, line 567, in create _new = cls(**creation_args) File “<attrs generated init 6be5738e08783da8302cc0d6dfcda474b56054b8>”, line 16, in init File “/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/pythonfinder/models/path.py”, line 510, in get_py_version py_version = PythonVersion.from_path(path=self, name=self.name) File “/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/pythonfinder/models/python.py”, line 418, in from_path instance_dict = cls.parse(py_version.strip()) File “/data/developer/.local/lib/python3.6/site-packages/pipenv/vendor/pythonfinder/models/python.py”, line 366, in parse raise ValueError(“Not a valid python version: %r” % version) ValueError: Not a valid python version: <LegacyVersion(‘Starting installer, one moment…\ndm.c: 1693: not running as root returning empty list\nanaconda argparse: terminal size detection failed, usin g default width\n[Errno 25] Inappropriate ioctl for device’)>
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
On my system - Centos 7 - anaconda is nothing to do with python
And
anaconda --help
says (among other things):As a workaround you can pass the full path to the python interpreter: