Pipenv: raise AttributeError(attr) AttributeError: version

Created on 3 Jan 2019  Â·  4Comments  Â·  Source: pypa/pipenv

When I create a virtualenv, i got an error:
File "c:\python27\lib\site-packages\pipenv\vendor\pythonfinder_vendor\pep514tools_registry.py", line 75, in __getattr__
raise AttributeError(attr)
AttributeError: version

how could i fix this?

$ pipenv2 install
Creating a virtualenv for this project...
Pipfile: E:\PycharmProjects\Web-Zyycb\Pipfile
Using c:\python27\python.exe (2.7.10) to create virtualenv...
[    ] Creating virtual environment...Already using interpreter c:\python27\python.exe
New python executable in c:\Users\gll\.virtualenvs\Web-Zyycb-zWY70Gje\Scripts\python.exe
Installing setuptools, pip, wheel...done.

Successfully created virtual environment!
Virtualenv location: c:\Users\gll\.virtualenvs\Web-Zyycb-zWY70Gje
Creating a Pipfile for this project...
Traceback (most recent call last):
  File "c:\python27\lib\runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "c:\python27\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "c:\Python27\Scripts\pipenv2.exe\__main__.py", line 9, in <module>
  File "c:\python27\lib\site-packages\pipenv\vendor\click\core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "c:\python27\lib\site-packages\pipenv\vendor\click\core.py", line 717, in main
    rv = self.invoke(ctx)
  File "c:\python27\lib\site-packages\pipenv\vendor\click\core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\python27\lib\site-packages\pipenv\vendor\click\core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\python27\lib\site-packages\pipenv\vendor\click\core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "c:\python27\lib\site-packages\pipenv\vendor\click\decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "c:\python27\lib\site-packages\pipenv\vendor\click\core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "c:\python27\lib\site-packages\pipenv\vendor\click\decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "c:\python27\lib\site-packages\pipenv\cli\command.py", line 254, in install
    editable_packages=state.installstate.editables,
  File "c:\python27\lib\site-packages\pipenv\core.py", line 1741, in do_install
    pypi_mirror=pypi_mirror,
  File "c:\python27\lib\site-packages\pipenv\core.py", line 609, in ensure_project
    validate=validate, skip_requirements=skip_requirements, system=system
  File "c:\python27\lib\site-packages\pipenv\core.py", line 320, in ensure_pipfile
    project.create_pipfile(python=python)
  File "c:\python27\lib\site-packages\pipenv\project.py", line 726, in create_pipfile
    required_python = self.which("python", self.virtualenv_location)
  File "c:\python27\lib\site-packages\pipenv\project.py", line 1083, in which
    result = next(iter(filter(None, (find(finder) for finder in self.finders))), None)
  File "c:\python27\lib\site-packages\pipenv\project.py", line 1083, in <genexpr>
    result = next(iter(filter(None, (find(finder) for finder in self.finders))), None)
  File "c:\python27\lib\site-packages\pipenv\vendor\pythonfinder\pythonfinder.py", line 67, in which
    return self.system_path.which(exe)
  File "c:\python27\lib\site-packages\pipenv\vendor\pythonfinder\pythonfinder.py", line 54, in system_path
    ignore_unsupported=self.ignore_unsupported,
  File "c:\python27\lib\site-packages\pipenv\vendor\pythonfinder\models\path.py", line 451, in create
    ignore_unsupported=ignore_unsupported,
  File "<attrs generated init 0c5e0ca48e6d72e07a67727a626d079225b052cd>", line 38, in __init__
  File "c:\python27\lib\site-packages\pipenv\vendor\pythonfinder\models\path.py", line 114, in __attrs_post_init__
    self._setup_windows()
  File "c:\python27\lib\site-packages\pipenv\vendor\pythonfinder\models\path.py", line 213, in _setup_windows
    self.windows_finder = WindowsFinder.create()
  File "c:\python27\lib\site-packages\pipenv\vendor\pythonfinder\models\windows.py", line 116, in create
    return cls()
  File "<attrs generated init 9aa6766aa25d25c58d475716fcbee001191ee1ef>", line 13, in __init__
  File "c:\python27\lib\site-packages\pipenv\vendor\pythonfinder\models\windows.py", line 92, in get_versions
    py_version = PythonVersion.from_windows_launcher(version_object)
  File "c:\python27\lib\site-packages\pipenv\vendor\pythonfinder\models\python.py", line 417, in from_windows_launcher
    creation_dict = cls.parse(launcher_entry.info.version)
  File "c:\python27\lib\site-packages\pipenv\vendor\pythonfinder\_vendor\pep514tools\_registry.py", line 75, in __getattr__
    raise AttributeError(attr)
AttributeError: version

gll@GLL-PC /E/PycharmProjects/Web-Zyycb (master)
$
Possible Bug Vendored Dependencies

All 4 comments

i tried to rollback to previous pipenv version. this bug does not found on pipenv-2018.7.1.

Sorry for the bug, fix is in the pipeline and will be up soon

I'm still getting this error in version 2018.11.26

Same here, still seeing this in June 2020 on Python 3.7.4

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hynek picture hynek  Â·  3Comments

FooBarQuaxx picture FooBarQuaxx  Â·  3Comments

marc-fez picture marc-fez  Â·  3Comments

fbender picture fbender  Â·  3Comments

leileigong picture leileigong  Â·  3Comments