Repository: pypa/pipenv

Issue:
pipenv install fails on windows 10
### Issue description

Failure to run install on windows

### Expected result

`pipenv install` should work

### Actual result

`pipenv install` fails with exception:

```
PS C:\Users\aucampia\d\dev.azure.com\pdgm\EPConnect\ui-components\guidelines> pipenv install --verbose
Traceback (most recent call last):
  File "c:\python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\Scripts\pipenv.exe\__main__.py", line 9, in <module>
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\vendor\click\core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\vendor\click\core.py", line 782, in main
    rv = self.invoke(ctx)
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\vendor\click\core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\vendor\click\core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\vendor\click\core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\vendor\click\decorators.py", line 73, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\vendor\click\core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\vendor\click\decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\cli\command.py", line 252, in install
    site_packages=state.site_packages
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\core.py", line 1928, in do_install
    site_packages=site_packages,
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\core.py", line 580, in ensure_project
    pypi_mirror=pypi_mirror,
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\core.py", line 498, in ensure_virtualenv
    python = ensure_python(three=three, python=python)
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\core.py", line 388, in ensure_python
    path_to_python = find_a_system_python(python)
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\core.py", line 354, in find_a_system_python
    python_entry = find_python(finder, line)
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\utils.py", line 2196, in find_python
    result = finder.find_python_version(line)
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\vendor\pythonfinder\pythonfinder.py", line 276, in find_python_version
    if os.name == "nt" and self.windows_finder is not None:
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\vendor\pythonfinder\pythonfinder.py", line 129, in windows_finder
    self._windows_finder = WindowsFinder()
  File "<attrs generated init pipenv.vendor.pythonfinder.models.windows.WindowsFinder>", line 13, in __init__
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\vendor\pythonfinder\models\windows.py", line 97, in get_versions
    version_object, name=name, company=company
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\vendor\pythonfinder\models\python.py", line 640, in from_windows_launcher
    creation_dict = cls.parse(launcher_entry.info.version)
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\vendor\pythonfinder\_vendor\pep514tools\_registry.py", line 75, in __getattr__
    raise AttributeError(attr)
AttributeError: version
```

### Steps to replicate

Pipfile:
```
# https://pipenv.pypa.io/en/latest/basics/
# https://pipenv.pypa.io/en/latest/advanced/
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]

[packages]
sphinx = "*"
sphinx-bootstrap-theme = "*"

[requires]
python_version = "3.6"

# pipenv lock -r > requirements.txt
# pipenv lock -r --dev-only > dev-requirements.txt
```

```
pip install --user --upgrade pipenv
pipenv install
```

-------------------------------------------------------------------------------

Adding backticks because output does not generate properly:

```
PS C:\Users\aucampia\d\dev.azure.com\pdgm\EPConnect\ui-components\guidelines> pipenv --support
<details><summary>$ pipenv --support</summary>

Pipenv version: `'2020.8.13'`

Pipenv location: `'C:\\Users\\aucampia\\AppData\\Roaming\\Python\\Python37\\site-packages\\pipenv'`

Python location: `'c:\\python37\\python.exe'`

Python installations found:

Traceback (most recent call last):
  File "c:\python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\Scripts\pipenv.exe\__main__.py", line 9, in <module>
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\vendor\click\core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\vendor\click\core.py", line 782, in main
    rv = self.invoke(ctx)
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\vendor\click\core.py", line 1236, in invoke
    return Command.invoke(self, ctx)
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\vendor\click\core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\vendor\click\core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\vendor\click\decorators.py", line 73, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\vendor\click\core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\vendor\click\decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\cli\command.py", line 139, in cli
    get_pipenv_diagnostics()
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\help.py", line 33, in get_pipenv_diagnostics
    python_paths = finder.find_all_python_versions()
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\vendor\pythonfinder\pythonfinder.py", line 312, in find_all_python_versions
    python_version_dict = getattr(self.system_path, "python_version_dict", {})
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\vendor\pythonfinder\pythonfinder.py", line 120, in system_path
    self._system_path = self.create_system_path()
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\vendor\pythonfinder\pythonfinder.py", line 86, in create_system_path
    ignore_unsupported=self.ignore_unsupported,
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\vendor\pythonfinder\models\path.py", line 682, in create
    instance = instance._run_setup()
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\vendor\pythonfinder\models\path.py", line 233, in _run_setup
    new_instance = new_instance._setup_windows()
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\vendor\pythonfinder\models\path.py", line 411, in _setup_windows
    windows_finder = WindowsFinder.create()
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\vendor\pythonfinder\models\windows.py", line 146, in create
    return cls()
  File "<attrs generated init pythonfinder.models.windows.WindowsFinder>", line 13, in __init__
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\vendor\pythonfinder\models\windows.py", line 97, in get_versions
    version_object, name=name, company=company
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\vendor\pythonfinder\models\python.py", line 640, in from_windows_launcher
    creation_dict = cls.parse(launcher_entry.info.version)
  File "C:\Users\aucampia\AppData\Roaming\Python\Python37\site-packages\pipenv\vendor\pythonfinder\_vendor\pep514tools\_registry.py", line 75, in __getattr__
    raise AttributeError(attr)
AttributeError: version
```


Discussion:

Resolving patch:
diff --git a/pipenv/vendor/pythonfinder/__init__.py b/pipenv/vendor/pythonfinder/__init__.py
--- a/pipenv/vendor/pythonfinder/__init__.py
+++ b/pipenv/vendor/pythonfinder/__init__.py
@@ -10,7 +10,7 @@
 from .models import SystemPath, WindowsFinder
 from .pythonfinder import Finder
 
-__version__ = "1.2.4"
+__version__ = "1.2.5"
 
 
 logger = logging.getLogger(__name__)
diff --git a/pipenv/vendor/pythonfinder/models/path.py b/pipenv/vendor/pythonfinder/models/path.py
--- a/pipenv/vendor/pythonfinder/models/path.py
+++ b/pipenv/vendor/pythonfinder/models/path.py
@@ -302,7 +302,7 @@ def _remove_path(self, path):
             normalized = normalize_path(current_path)
             if normalized != target:
                 new_order.append(normalized)
-        new_order = [p for p in reversed(new_order)]
+        new_order = [ensure_path(p).as_posix() for p in reversed(new_order)]
         return attr.evolve(self, path_order=new_order, paths=new_paths)
 
     def _setup_asdf(self):
diff --git a/pipenv/vendor/pythonfinder/models/windows.py b/pipenv/vendor/pythonfinder/models/windows.py
--- a/pipenv/vendor/pythonfinder/models/windows.py
+++ b/pipenv/vendor/pythonfinder/models/windows.py
@@ -96,7 +96,7 @@ def get_versions(self):
                 py_version = PythonVersion.from_windows_launcher(
                     version_object, name=name, company=company
                 )
-            except InvalidPythonVersion:
+            except (InvalidPythonVersion, AttributeError):
                 continue
             if py_version is None:
                 continue


Test patch: