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

Unable to create a new pipenv powered project on Windows #4330

Closed
nickperkins opened this issue Jun 8, 2020 · 25 comments · Fixed by #4437
Closed

Unable to create a new pipenv powered project on Windows #4330

nickperkins opened this issue Jun 8, 2020 · 25 comments · Fixed by #4437
Labels
Type: Bug 🐛 This issue is a bug. Type: Regression This issue is a regression of a previous behavior.

Comments

@nickperkins
Copy link

Issue description

When trying to set up a new project in pipenv, it is unable to find the scripts dir from the virtual environment

Expected result

Create new virtual environment and create Pipfile for project.

Actual result

$ pipenv install boto3
Creating a virtualenv for this project…
Pipfile: E:\ScriptDir\Generic\test\Pipfile
Using C:/Users/nick.perkins/AppData/Local/Programs/Python/Python37/python.exe (3.7.4) to create virtualenv…
[    ] Creating virtual environment...Already using interpreter C:\Users\nick.perkins\AppData\Local\Programs\Python\Python37\python.exe
Using base prefix 'C:\\Users\\nick.perkins\\AppData\\Local\\Programs\\Python\\Python37'
New python executable in C:\Users\nick.perkins\.virtualenvs\test-9QO8X7jI\Scripts\python.exe
Installing setuptools, pip, wheel...
done.
Running virtualenv with interpreter C:/Users/nick.perkins/AppData/Local/Programs/Python/Python37/python.exe

Successfully created virtual environment!
Virtualenv location: C:\Users\nick.perkins\.virtualenvs\test-9QO8X7jI
Creating a Pipfile for this project…
Traceback (most recent call last):
  File "c:\users\nick.perkins\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\nick.perkins\appdata\local\programs\python\python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\nick.perkins\AppData\Local\Programs\Python\Python37\Scripts\pipenv.exe\__main__.py", line 9, in <module>
  File "c:\users\nick.perkins\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\click\core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "c:\users\nick.perkins\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\click\core.py", line 782, in main
    rv = self.invoke(ctx)
  File "c:\users\nick.perkins\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\click\core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\users\nick.perkins\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\click\core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\users\nick.perkins\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\click\core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "c:\users\nick.perkins\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\click\decorators.py", line 73, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "c:\users\nick.perkins\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\click\core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "c:\users\nick.perkins\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\click\decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "c:\users\nick.perkins\appdata\local\programs\python\python37\lib\site-packages\pipenv\cli\command.py", line 252, in install
    site_packages=state.site_packages
  File "c:\users\nick.perkins\appdata\local\programs\python\python37\lib\site-packages\pipenv\core.py", line 1929, in do_install
    site_packages=site_packages,
  File "c:\users\nick.perkins\appdata\local\programs\python\python37\lib\site-packages\pipenv\core.py", line 615, in ensure_project
    validate=validate, skip_requirements=skip_requirements, system=system
  File "c:\users\nick.perkins\appdata\local\programs\python\python37\lib\site-packages\pipenv\core.py", line 320, in ensure_pipfile
    project.create_pipfile(python=python)
  File "c:\users\nick.perkins\appdata\local\programs\python\python37\lib\site-packages\pipenv\project.py", line 753, in create_pipfile
    required_python = self.which("python", self.virtualenv_location)
  File "c:\users\nick.perkins\appdata\local\programs\python\python37\lib\site-packages\pipenv\project.py", line 1126, in which
    result = next(iter(filter(None, (find(finder) for finder in self.finders))), None)
  File "c:\users\nick.perkins\appdata\local\programs\python\python37\lib\site-packages\pipenv\project.py", line 1126, in <genexpr>
    result = next(iter(filter(None, (find(finder) for finder in self.finders))), None)
  File "c:\users\nick.perkins\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\pythonfinder\pythonfinder.py", line 134, in which
    return self.system_path.which(exe)
  File "c:\users\nick.perkins\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\pythonfinder\models\path.py", line 483, in which
    return next(iter(f for f in filtered if f is not None), None)
  File "c:\users\nick.perkins\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\pythonfinder\models\path.py", line 483, in <genexpr>
    return next(iter(f for f in filtered if f is not None), None)
  File "c:\users\nick.perkins\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\pythonfinder\models\path.py", line 482, in <genexpr>
    filtered = (sub_which(self.get_path(k)) for k in self.path_order)
  File "c:\users\nick.perkins\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\pythonfinder\models\path.py", line 438, in get_path
    raise ValueError("Path not found or generated: {0!r}".format(path))
ValueError: Path not found or generated: WindowsPath('c:/users/nick.perkins/.virtualenvs/test-9qo8x7ji/scripts')

Steps to replicate

Provide the steps to replicate (which usually at least includes the commands and the Pipfile).

pipenv install boto3

No Pipfile was createdpipenv


$ pipenv --support

Pipenv version: '2020.6.2'

Pipenv location: 'c:\\users\\nick.perkins\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\pipenv'

Python location: 'c:\\users\\nick.perkins\\appdata\\local\\programs\\python\\python37\\python.exe'

Python installations found:

  • 3.7.4: C:\Users\nick.perkins\AppData\Local\Programs\Python\Python37\python.exe
  • 3.7.2: C:\Users\nick.perkins\.pyenv\pyenv-win\versions\3.7.2\python.exe

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.7.4',
 'os_name': 'nt',
 'platform_machine': 'AMD64',
 'platform_python_implementation': 'CPython',
 'platform_release': '10',
 'platform_system': 'Windows',
 'platform_version': '10.0.14393',
 'python_full_version': '3.7.4',
 'python_version': '3.7',
 'sys_platform': 'win32'}

System environment variables:

  • ACLOCAL_PATH
  • ALLUSERSPROFILE
  • APPDATA
  • AWS_PROFILE
  • CLIENTNAME
  • COMMONPROGRAMFILES
  • COMPUTERNAME
  • COMSPEC
  • CONFIG_SITE
  • COMMONPROGRAMFILES(X86)
  • COMMONPROGRAMW6432
  • DISPLAY
  • EXEPATH
  • HOME
  • HOMEDRIVE
  • HOMEPATH
  • HOSTNAME
  • INFOPATH
  • LANG
  • LOCALAPPDATA
  • LOGONSERVER
  • MANPATH
  • MINGW_CHOST
  • MINGW_PACKAGE_PREFIX
  • MINGW_PREFIX
  • MSYSTEM
  • MSYSTEM_CARCH
  • MSYSTEM_CHOST
  • MSYSTEM_PREFIX
  • NUMBER_OF_PROCESSORS
  • OLDPWD
  • ORIGINAL_PATH
  • ORIGINAL_TEMP
  • ORIGINAL_TMP
  • OS
  • PATH
  • PATHEXT
  • PKG_CONFIG_PATH
  • PLINK_PROTOCOL
  • PROCESSOR_ARCHITECTURE
  • PROCESSOR_IDENTIFIER
  • PROCESSOR_LEVEL
  • PROCESSOR_REVISION
  • PROGRAMFILES
  • PS1
  • PSMODULEPATH
  • PUBLIC
  • PWD
  • PYENV
  • PROGRAMDATA
  • PROGRAMFILES(X86)
  • PROGRAMW6432
  • SESSIONNAME
  • SHELL
  • SHLVL
  • SSH_ASKPASS
  • SYSTEMDRIVE
  • SYSTEMROOT
  • TEMP
  • TERM
  • TMP
  • TMPDIR
  • USERDNSDOMAIN
  • USERDOMAIN
  • USERDOMAIN_ROAMINGPROFILE
  • USERNAME
  • USERPROFILE
  • WINDIR
  • _
  • PIP_DISABLE_PIP_VERSION_CHECK
  • PYTHONDONTWRITEBYTECODE
  • PIP_SHIMS_BASE_MODULE
  • PIP_PYTHON_PATH
  • PYTHONFINDER_IGNORE_UNSUPPORTED

PipenvÔÇôspecific environment variables:

DebugÔÇôspecific environment variables:

  • PATH: C:\Users\nick.perkins\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\nick.perkins\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Amazon\cfn-bootstrap;C:\Program Files\Git\cmd;C:\Program Files\7-Zip;C:\Program Files\TortoiseGit\bin;C:\Program Files\Amazon\AWSCLIV2;C:\Users\nick.perkins\.pyenv\pyenv-win\bin;C:\Users\nick.perkins\.pyenv\pyenv-win\shims;C:\Users\nick.perkins\AppData\Local\Programs\Python\Python37\Scripts;C:\Users\nick.perkins\AppData\Local\Programs\Python\Python37;C:\Users\nick.perkins\AppData\Local\Microsoft\WindowsApps;C:\Users\nick.perkins\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
  • SHELL: C:\Program Files\Git\usr\bin\bash.exe
  • LANG: en_US.UTF-8
  • PWD: E:/ScriptDir/Generic/test

@max-niederman
Copy link

+1 had this same problem

@rfkortekaas
Copy link

I've investigated this issue and it is introduced in the normalize_path function. At some point the path_order list in the pythonfinder path model contains the paths with normalized case while the get_path function gets a path without normalized case and the path cannot be found in the defaultdict due to case differences. It looks like this only happens on windows when pyenv is also installed.

The normalize_path function was already on the nomination to be refactored in vistir.

@crmne
Copy link

crmne commented Jul 2, 2020

+1

@JonasR
Copy link

JonasR commented Jul 6, 2020

Ran into the same issue today

@dennisroche
Copy link

dennisroche commented Jul 10, 2020

I've investigated this issue and it is introduced in the normalize_path function. At some point the path_order list in the pythonfinder path model contains the paths with normalized case while the get_path function gets a path without normalized case and the path cannot be found in the defaultdict due to case differences. It looks like this only happens on windows when pyenv is also installed.

The normalize_path function was already on the nomination to be refactored in vistir.

is there a known workaround to this?

UPDATE: roll back to 2018.11.26 release (https://pypi.org/project/pipenv/2018.11.26/)

@ghanshyam30
Copy link

I've investigated this issue and it is introduced in the normalize_path function. At some point the path_order list in the pythonfinder path model contains the paths with normalized case while the get_path function gets a path without normalized case and the path cannot be found in the defaultdict due to case differences. It looks like this only happens on windows when pyenv is also installed.
The normalize_path function was already on the nomination to be refactored in vistir.

is there a known workaround to this?

UPDATE: roll back to 2018.11.26 release (https://pypi.org/project/pipenv/2018.11.26/)

This resolved my problem, thanks a bunch!

@nickperkins
Copy link
Author

It looks like this only happens on windows when pyenv is also installed.

I don't have pyenv installed

@nickperkins
Copy link
Author

I've found that if I add a Pipfile to the target folder and then run pip install I can get a new pipenv working

@prataplyf
Copy link

update your virtualenv pipenv
pip install pipenv==2018.11.26
this works for me

@nickperkins
Copy link
Author

nickperkins commented Jul 31, 2020 via email

@prataplyf
Copy link

That's great but that's not an upgrade

On Fri, 31 Jul 2020, 5:30 pm Ashish Pratap Singh, @.***> wrote: update your virtualenv pipenv pip install pipenv==2018.11.26 this works for me — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#4330 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAELERBVBIQM6FQXXXXG6HLR6JXJRANCNFSM4NYCKWIA .

that's true.

might be some of your modules that are not updated and that not support the updated pipenv.

so when you update all modules the updated pipenv will work for you.

@nickperkins
Copy link
Author

nickperkins commented Aug 5, 2020

Just to make it clear to everyone,

pip install pipenv==2018.11.26 installs an older version of pipenv. It is NOT an upgrade.

@darnley
Copy link

darnley commented Aug 12, 2020

Same issue here.

@davem99
Copy link

davem99 commented Aug 15, 2020

Same issue here, can't actually use pipenv.
Going back to the 2018.11.26 version does allow me to pip install inside my project folder.

@meichthys
Copy link

meichthys commented Aug 26, 2020

@nickperkins

It looks like there was some kind of regression after 2018.11.26
As @rfkortekaas mentioned, seems to be an issue of normalized case in the path. Pipenv is trying to search for a python executable path, but on windows it is trying to find a as_posix path in self.path_order which has paths formatted with double \\ instead of single / (as changed by as_posix)

The relevant pipenv code seems to be in: pipenv\vendor\pythonfinder\models\path.py (Line 432).
I can get the latest version of pyenv to work if i change Line 432 to the following:
if not _path and os.path.normcase(path.as_posix()) in self.path_order:

I'm not sure anything else would need to be done to make this more of a robust workaround, but it should work cross-platform since os.path.normcase does nothing on other platforms.

@meichthys
Copy link

@ken-reitz @techalchemy
I've submitted a fix for this upstream. Could we get this pulled in when/if the upstream pull request is accepted?

@frostming
Copy link
Contributor

@meichthys Can you figure out where the back-slashed paths are introduced since I searched all the path_order assignments and all are normalized by as_posix().

@frostming frostming added the Status: Needs More Information This issue does not provide enough information to take further action. label Aug 27, 2020
@frostming
Copy link
Contributor

Given the complicated and varying env setup, a minimal reproducible example is of great help.

@rfkortekaas
Copy link

@frostming some path entries are setup with normalize_path from pipenv\pythonfinder\utils.py. This function uses normcase and normpath. On windows this changes forward slashes to backward slashes. Where as_posix returns the path with forward slashes. It took me a long time the track down the issue and I ended up with removing normcase from normalize_path what basically results in the same as the solution from @meichthys.

The issue only occurs when one of the _setup_* functions are called. So it looks like the path_order with the wrong formatting is coming form the new_instances created in the _setup_* functions.

@frostming
Copy link
Contributor

@rfkortekaas Thanks, that is enlightening. I have addressed it in the upstream. sarugaku/pythonfinder#89

@rfkortekaas
Copy link

@frostming Thanks. I've tested your solution in the PR and it looks like everything is working as it should!

@frostming frostming added Type: Bug 🐛 This issue is a bug. Type: Regression This issue is a regression of a previous behavior. and removed Status: Needs More Information This issue does not provide enough information to take further action. triage labels Aug 27, 2020
@meichthys
Copy link

Also tested and working! 🚀

@Timtam
Copy link

Timtam commented Oct 9, 2020

Sorry to bring this up again, but I'm running into the same issues right now.

pipenv install black isort flake8 mypy --dev

Creating a virtualenv for this project…

Pipfile: F:\Privat\Skripte\pyAGE\Pipfile

Using default python from c:\users\toni\.local\pipx\venvs\pipenv\scripts\python.exe (3.8.2) to create virtualenv…


[    ] Creating virtual environment...�
[=   ] Creating virtual environment...�
[==  ] Creating virtual environment...�
[=== ] Creating virtual environment...�
[ ===] Creating virtual environment...�
[  ==] Creating virtual environment...�
[   =] Creating virtual environment...created virtual environment CPython3.8.2.final.0-64 in 427ms
  creator CPython3Windows(dest=C:\Users\Toni\.virtualenvs\pyAGE-Qx2pNdmj, clear=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=C:\Users\Toni\AppData\Local\pypa\virtualenv)
    added seed packages: pip==20.2.3, setuptools==50.3.0, wheel==0.35.1
  activators BashActivator,BatchActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator

�Successfully created virtual environment! 
Virtualenv location: C:\Users\Toni\.virtualenvs\pyAGE-Qx2pNdmj
Creating a Pipfile for this project…
Traceback (most recent call last):
  File "c:\users\toni\.pyenv\pyenv-win\versions\3.8.2\lib\runpy.py", line 193, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\toni\.pyenv\pyenv-win\versions\3.8.2\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\Toni\.local\bin\pipenv.exe\__main__.py", line 7, in <module>
  File "C:\Users\Toni\.local\pipx\venvs\pipenv\Lib\site-packages\pipenv\vendor\click\core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\Toni\.local\pipx\venvs\pipenv\Lib\site-packages\pipenv\vendor\click\core.py", line 782, in main
    rv = self.invoke(ctx)
  File "C:\Users\Toni\.local\pipx\venvs\pipenv\Lib\site-packages\pipenv\vendor\click\core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\Toni\.local\pipx\venvs\pipenv\Lib\site-packages\pipenv\vendor\click\core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\Toni\.local\pipx\venvs\pipenv\Lib\site-packages\pipenv\vendor\click\core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "C:\Users\Toni\.local\pipx\venvs\pipenv\Lib\site-packages\pipenv\vendor\click\decorators.py", line 73, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "C:\Users\Toni\.local\pipx\venvs\pipenv\Lib\site-packages\pipenv\vendor\click\core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "C:\Users\Toni\.local\pipx\venvs\pipenv\Lib\site-packages\pipenv\vendor\click\decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "c:\users\toni\.local\pipx\venvs\pipenv\lib\site-packages\pipenv\cli\command.py", line 232, in install
    retcode = do_install(
  File "c:\users\toni\.local\pipx\venvs\pipenv\lib\site-packages\pipenv\core.py", line 1920, in do_install
    ensure_project(
  File "c:\users\toni\.local\pipx\venvs\pipenv\lib\site-packages\pipenv\core.py", line 614, in ensure_project
    ensure_pipfile(
  File "c:\users\toni\.local\pipx\venvs\pipenv\lib\site-packages\pipenv\core.py", line 320, in ensure_pipfile
    project.create_pipfile(python=python)
  File "c:\users\toni\.local\pipx\venvs\pipenv\lib\site-packages\pipenv\project.py", line 755, in create_pipfile
    required_python = self.which("python", self.virtualenv_location)
  File "c:\users\toni\.local\pipx\venvs\pipenv\lib\site-packages\pipenv\project.py", line 1128, in which
    result = next(iter(filter(None, (find(finder) for finder in self.finders))), None)
  File "c:\users\toni\.local\pipx\venvs\pipenv\lib\site-packages\pipenv\project.py", line 1128, in <genexpr>
    result = next(iter(filter(None, (find(finder) for finder in self.finders))), None)
  File "c:\users\toni\.local\pipx\venvs\pipenv\lib\site-packages\pipenv\vendor\pythonfinder\pythonfinder.py", line 134, in which
    return self.system_path.which(exe)
  File "C:\Users\Toni\.local\pipx\venvs\pipenv\Lib\site-packages\pipenv\vendor\pythonfinder\models\path.py", line 483, in which
    return next(iter(f for f in filtered if f is not None), None)
  File "C:\Users\Toni\.local\pipx\venvs\pipenv\Lib\site-packages\pipenv\vendor\pythonfinder\models\path.py", line 483, in <genexpr>
    return next(iter(f for f in filtered if f is not None), None)
  File "C:\Users\Toni\.local\pipx\venvs\pipenv\Lib\site-packages\pipenv\vendor\pythonfinder\models\path.py", line 482, in <genexpr>
    filtered = (sub_which(self.get_path(k)) for k in self.path_order)
  File "C:\Users\Toni\.local\pipx\venvs\pipenv\Lib\site-packages\pipenv\vendor\pythonfinder\models\path.py", line 438, in get_path
    raise ValueError("Path not found or generated: {0!r}".format(path))
ValueError: Path not found or generated: WindowsPath('c:/users/toni/.virtualenvs/pyage-qx2pndmj/scripts')

Here is the installed pipenv version:

pipx list

venvs are in C:\Users\Toni\.local\pipx\venvs
apps are exposed on your $PATH at C:\Users\Toni\.local\bin
   package pipenv 2020.8.13, Python 3.8.2
    - pipenv-resolver.exe
    - pipenv.exe

Is there no way to solve this except going back to a two-year old version by now?
Thanks.

@rfkortekaas
Copy link

@Timtam this has been fixed in the upstream version which haven't been released yet.
You can install the latest version from git:
pip install -e git+https://github.com/pypa/pipenv.git

Or patch your local installation with the fixes in the pull request.

@frostming any idea when a new version will be released?

@sandyscott
Copy link

I needed to specify the egg name to pull the latest version
pip install -e git+https://github.com/pypa/pipenv.git#egg=pipenv

wip-sync referenced this issue in NetBSD/pkgsrc-wip Jan 21, 2022
2022.1.8 (2022-01-08)
=====================

Bug Fixes
---------

- Remove the extra parentheses around the venv prompt.  `#4877 <https://github.com/pypa/pipenv/issues/4877>`_
- Fix a bug of installation fails when extra index url is given.  `#4881 <https://github.com/pypa/pipenv/issues/4881>`_
- Fix regression where lockfiles would only include the hashes for releases for the platform generating the lockfile  `#4885 <https://github.com/pypa/pipenv/issues/4885>`_
- Fix the index parsing to reject illegal requirements.txt.  `#4899 <https://github.com/pypa/pipenv/issues/4899>`_

2021.11.23 (2021-11-23)
=======================

Bug Fixes
---------

- Update ``charset-normalizer`` from ``2.0.3`` to ``2.0.7``, this fixes an import error on Python 3.6.  `#4865 <https://github.com/pypa/pipenv/issues/4865>`_
- Fix a bug of deleting a virtualenv that is not managed by Pipenv.  `#4867 <https://github.com/pypa/pipenv/issues/4867>`_
- Fix a bug that source is not added to ``Pipfile`` when index url is given with ``pipenv install``.  `#4873 <https://github.com/pypa/pipenv/issues/4873>`_

2021.11.15 (2021-11-15)
=======================

Bug Fixes
---------

- Return an empty dict when ``PIPENV_DONT_LOAD_ENV`` is set.  `#4851 <https://github.com/pypa/pipenv/issues/4851>`_
- Don't use ``sys.executable`` when inside an activated venv.  `#4852 <https://github.com/pypa/pipenv/issues/4852>`_

Vendored Libraries
------------------

- Drop the vendored ``jinja2`` dependency as it is not needed any more.  `#4858 <https://github.com/pypa/pipenv/issues/4858>`_
- Update ``click`` from ``8.0.1`` to ``8.0.3``, to fix a problem with bash completion.  `#4860 <https://github.com/pypa/pipenv/issues/4860>`_
- Drop unused vendor ``chardet``.  `#4862 <https://github.com/pypa/pipenv/issues/4862>`_

Improved Documentation
----------------------

- Fix the documentation to reflect the fact that special characters must be percent-encoded in the URL.  `#4856 <https://github.com/pypa/pipenv/issues/4856>`_

2021.11.9 (2021-11-09)
======================

Features & Improvements
-----------------------

- Replace ``click-completion`` with ``click``'s own completion implementation.  `#4786 <https://github.com/pypa/pipenv/issues/4786>`_

Bug Fixes
---------

- Fix a bug that ``pipenv run`` doesn't set environment variables correctly.  `#4831 <https://github.com/pypa/pipenv/issues/4831>`_
- Fix a bug that certifi can't be loaded within ``notpip``'s vendor library. This makes several objects of ``pip`` fail to be imported.  `#4833 <https://github.com/pypa/pipenv/issues/4833>`_
- Fix a bug that ``3.10.0`` can be found be python finder.  `#4837 <https://github.com/pypa/pipenv/issues/4837>`_

Vendored Libraries
------------------

- Update ``pythonfinder`` from ``1.2.8`` to ``1.2.9``.  `#4837 <https://github.com/pypa/pipenv/issues/4837>`_

2021.11.5.post0 (2021-11-05)
============================

Bug Fixes
---------

- Fix a regression that ``pipenv shell`` fails to start a subshell.  `#4828 <https://github.com/pypa/pipenv/issues/4828>`_
- Fix a regression that ``pip_shims`` object isn't imported correctly.  `#4829 <https://github.com/pypa/pipenv/issues/4829>`_

2021.11.5 (2021-11-05)
======================

Features & Improvements
-----------------------

- Avoid sharing states but create project objects on demand. So that most integration test cases are able to switch to a in-process execution method.  `#4757 <https://github.com/pypa/pipenv/issues/4757>`_
- Shell-quote ``pip`` commands when logging.  `#4760 <https://github.com/pypa/pipenv/issues/4760>`_

Bug Fixes
---------

- Ignore empty .venv in rood dir and create project name base virtual environment  `#4790 <https://github.com/pypa/pipenv/issues/4790>`_

Vendored Libraries
------------------

- Update vendored dependencies
  - ``attrs`` from ``20.3.0`` to ``21.2.0``
  - ``cerberus`` from ``1.3.2`` to ``1.3.4``
  - ``certifi`` from ``2020.11.8`` to ``2021.5.30``
  - ``chardet`` from ``3.0.4`` to ``4.0.0``
  - ``click`` from ``7.1.2`` to ``8.0.1``
  - ``distlib`` from ``0.3.1`` to ``0.3.2``
  - ``idna`` from ``2.10`` to ``3.2``
  - ``importlib-metadata`` from ``2.0.0`` to ``4.6.1``
  - ``importlib-resources`` from ``3.3.0`` to ``5.2.0``
  - ``jinja2`` from ``2.11.2`` to ``3.0.1``
  - ``markupsafe`` from ``1.1.1`` to ``2.0.1``
  - ``more-itertools`` from ``5.0.0`` to ``8.8.0``
  - ``packaging`` from ``20.8`` to ``21.0``
  - ``pep517`` from ``0.9.1`` to ``0.11.0``
  - ``pipdeptree`` from ``1.0.0`` to ``2.0.0``
  - ``ptyprocess`` from ``0.6.0`` to ``0.7.0``
  - ``python-dateutil`` from ``2.8.1`` to ``2.8.2``
  - ``python-dotenv`` from ``0.15.0`` to ``0.19.0``
  - ``pythonfinder`` from ``1.2.5`` to ``1.2.8``
  - ``requests`` from ``2.25.0`` to ``2.26.0``
  - ``shellingham`` from ``1.3.2`` to ``1.4.0``
  - ``six`` from ``1.15.0`` to ``1.16.0``
  - ``tomlkit`` from ``0.7.0`` to ``0.7.2``
  - ``urllib3`` from ``1.26.1`` to ``1.26.6``
  - ``zipp`` from ``1.2.0`` to ``3.5.0``

  Add new vendored dependencies
  - ``charset-normalizer 2.0.3``
  - ``termcolor 1.1.0``
  - ``tomli 1.1.0``
  - ``wheel 0.36.2``  `#4747 <https://github.com/pypa/pipenv/issues/4747>`_
- Drop the dependencies for Python 2.7 compatibility purpose.  `#4751 <https://github.com/pypa/pipenv/issues/4751>`_
- Switch the dependency resolver from ``pip-tools`` to `pip`.

  Update vendor libraries:
  - Update ``requirementslib`` from ``1.5.16`` to ``1.6.1``
  - Update ``pip-shims`` from ``0.5.6`` to ``0.6.0``
  - New vendor ``platformdirs 2.4.0``  `#4759 <https://github.com/pypa/pipenv/issues/4759>`_

Improved Documentation
----------------------

- remove prefixes on install commands for easy copy/pasting  `#4792 <https://github.com/pypa/pipenv/issues/4792>`_
- Officially drop support for Python 2.7 and Python 3.5.  `#4261 <https://github.com/pypa/pipenv/issues/4261>`_

2021.5.29 (2021-05-29)
======================

Bug Fixes
---------

- Fix a bug where passing --skip-lock when PIPFILE has no [SOURCE] section throws the error: "tomlkit.exceptions.NonExistentKey: 'Key "source" does not exist.'"  `#4141 <https://github.com/pypa/pipenv/issues/4141>`_
- Fix bug where environment wouldn't activate in paths containing & and $ symbols  `#4538 <https://github.com/pypa/pipenv/issues/4538>`_
- Fix a bug that ``importlib-metadata`` from the project's dependencies conflicts with that from ``pipenv``'s.  `#4549 <https://github.com/pypa/pipenv/issues/4549>`_
- Fix a bug where ``pep508checker.py`` did not expect double-digit Python minor versions (e.g. "3.10").  `#4602 <https://github.com/pypa/pipenv/issues/4602>`_
- Fix bug where environment wouldn't activate in paths containing () and [] symbols  `#4615 <https://github.com/pypa/pipenv/issues/4615>`_
- Fix bug preventing use of pipenv lock --pre  `#4642 <https://github.com/pypa/pipenv/issues/4642>`_

Vendored Libraries
------------------

- Update ``packaging`` from ``20.4`` to ``20.8``.  `#4591 <https://github.com/pypa/pipenv/issues/4591>`_

2020.11.15 (2020-11-15)
=======================

Features & Improvements
-----------------------

- Support expanding environment variables in requirement URLs.  `#3516 <https://github.com/pypa/pipenv/issues/3516>`_
- Show warning message when a dependency is skipped in locking due to the mismatch of its markers.  `#4346 <https://github.com/pypa/pipenv/issues/4346>`_

Bug Fixes
---------

- Fix a bug that executable scripts with leading backslash can't be executed via ``pipenv run``.  `#4368 <https://github.com/pypa/pipenv/issues/4368>`_
- Fix a bug that VCS dependencies always satisfy even if the ref has changed.  `#4387 <https://github.com/pypa/pipenv/issues/4387>`_
- Restrict the acceptable hash type to SHA256 only.  `#4517 <https://github.com/pypa/pipenv/issues/4517>`_
- Fix the output of ``pipenv scripts`` under Windows platform.  `#4523 <https://github.com/pypa/pipenv/issues/4523>`_
- Fix a bug that the resolver takes wrong section to validate constraints.  `#4527 <https://github.com/pypa/pipenv/issues/4527>`_

Vendored Libraries
------------------

- Update vendored dependencies:
    - ``colorama`` from ``0.4.3`` to ``0.4.4``
    - ``python-dotenv`` from ``0.10.3`` to ``0.15.0``
    - ``first`` from ``2.0.1`` to ``2.0.2``
    - ``iso8601`` from ``0.1.12`` to ``0.1.13``
    - ``parse`` from ``1.15.0`` to ``1.18.0``
    - ``pipdeptree`` from ``0.13.2`` to ``1.0.0``
    - ``requests`` from ``2.23.0`` to ``2.25.0``
    - ``idna`` from ``2.9`` to ``2.10``
    - ``urllib3`` from ``1.25.9`` to ``1.26.1``
    - ``certifi`` from ``2020.4.5.1`` to ``2020.11.8``
    - ``requirementslib`` from ``1.5.15`` to ``1.5.16``
    - ``attrs`` from ``19.3.0`` to ``20.3.0``
    - ``distlib`` from ``0.3.0`` to ``0.3.1``
    - ``packaging`` from ``20.3`` to ``20.4``
    - ``six`` from ``1.14.0`` to ``1.15.0``
    - ``semver`` from ``2.9.0`` to ``2.13.0``
    - ``toml`` from ``0.10.1`` to ``0.10.2``
    - ``cached-property`` from ``1.5.1`` to ``1.5.2``
    - ``yaspin`` from ``0.14.3`` to ``1.2.0``
    - ``resolvelib`` from ``0.3.0`` to ``0.5.2``
    - ``pep517`` from ``0.8.2`` to ``0.9.1``
    - ``zipp`` from ``0.6.0`` to ``1.2.0``
    - ``importlib-metadata`` from ``1.6.0`` to ``2.0.0``
    - ``importlib-resources`` from ``1.5.0`` to ``3.3.0``  `#4533 <https://github.com/pypa/pipenv/issues/4533>`_

Improved Documentation
----------------------

- Fix suggested pyenv setup to avoid using shimmed interpreter  `#4534 <https://github.com/pypa/pipenv/issues/4534>`_

2020.11.4 (2020-11-04)
======================

Features & Improvements
-----------------------

- Add a new command ``pipenv scripts`` to display shortcuts from Pipfile.  `#3686 <https://github.com/pypa/pipenv/issues/3686>`_
- Retrieve package file hash from URL to accelerate the locking process.  `#3827 <https://github.com/pypa/pipenv/issues/3827>`_
- Add the missing ``--system`` option to ``pipenv sync``.  `#4441 <https://github.com/pypa/pipenv/issues/4441>`_
- Add a new option pair ``--header/--no-header`` to ``pipenv lock`` command,
  which adds a header to the generated requirements.txt  `#4443 <https://github.com/pypa/pipenv/issues/4443>`_

Bug Fixes
---------

- Fix a bug that percent encoded characters will be unquoted incorrectly in the file URL.  `#4089 <https://github.com/pypa/pipenv/issues/4089>`_
- Fix a bug where setting PIPENV_PYTHON to file path breaks environment name  `#4225 <https://github.com/pypa/pipenv/issues/4225>`_
- Fix a bug that paths are not normalized before comparison.  `#4330 <https://github.com/pypa/pipenv/issues/4330>`_
- Handle Python major and minor versions correctly in Pipfile creation.  `#4379 <https://github.com/pypa/pipenv/issues/4379>`_
- Fix a bug that non-wheel file requirements can be resolved successfully.  `#4386 <https://github.com/pypa/pipenv/issues/4386>`_
- Fix a bug that ``pexept.exceptions.TIMEOUT`` is not caught correctly because of the wrong import path.  `#4424 <https://github.com/pypa/pipenv/issues/4424>`_
- Fix a bug that compound TOML table is not parsed correctly.  `#4433 <https://github.com/pypa/pipenv/issues/4433>`_
- Fix a bug that invalid Python paths from Windows registry break ``pipenv install``.  `#4436 <https://github.com/pypa/pipenv/issues/4436>`_
- Fix a bug that function calls in ``setup.py`` can't be parsed rightly.  `#4446 <https://github.com/pypa/pipenv/issues/4446>`_
- Fix a bug that dist-info inside ``venv`` directory will be mistaken as the editable package's metadata.  `#4480 <https://github.com/pypa/pipenv/issues/4480>`_
- Make the order of hashes in resolution result stable.  `#4513 <https://github.com/pypa/pipenv/issues/4513>`_

Vendored Libraries
------------------

- Update ``tomlkit`` from ``0.5.11`` to ``0.7.0``.  `#4433 <https://github.com/pypa/pipenv/issues/4433>`_
- Update ``requirementslib`` from ``1.5.13`` to ``1.5.14``.  `#4480 <https://github.com/pypa/pipenv/issues/4480>`_

Improved Documentation
----------------------

- Discourage homebrew installation in installation guides.  `#4013 <https://github.com/pypa/pipenv/issues/4013>`_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug 🐛 This issue is a bug. Type: Regression This issue is a regression of a previous behavior.
Projects
None yet