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

raise AttributeError(attr) AttributeError: version #3422

Closed
leileigong opened this issue Jan 3, 2019 · 4 comments · Fixed by #3298
Closed

raise AttributeError(attr) AttributeError: version #3422

leileigong opened this issue Jan 3, 2019 · 4 comments · Fixed by #3298
Labels
Type: Possible Bug This issue describes a possible bug in pipenv. Type: Vendored Dependencies This issue affects vendored dependencies within pipenv.

Comments

@leileigong
Copy link

leileigong commented Jan 3, 2019

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)
$
@frostming frostming added Type: Possible Bug This issue describes a possible bug in pipenv. Type: Vendored Dependencies This issue affects vendored dependencies within pipenv. labels Jan 3, 2019
@leileigong
Copy link
Author

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

@techalchemy
Copy link
Member

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

techalchemy added a commit that referenced this issue Jan 22, 2019
- Update gitignore entries for mypy config
- Update release task to add version after bumping but before release
- Fixes #3326 (going forward at least)
- Split out patching from vendoring so it can be done as a separate step
  if needed
- Update patches to account for updated packages
- Fixes #3432
- Fixes #2757
- Fixes #3305
- Fixes #2914
- Fixes #3439
- Fixes #3422
- Fixes #3378
- Fixes #3376
- Fixes #3315

Signed-off-by: Dan Ryan <dan@danryan.co>
@techalchemy techalchemy added this to the March Release milestone Mar 5, 2019
@DoubleCouponDay
Copy link

I'm still getting this error in version 2018.11.26

@MausamGaurav
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Possible Bug This issue describes a possible bug in pipenv. Type: Vendored Dependencies This issue affects vendored dependencies within pipenv.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants