Invalid version and will not be supported in a future release
When i run pipenv shell i get the following warning/error?
pipenv shell
/usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 1.1build1 is an invalid version and will not be supported in a future release
warnings.warn(
/usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 0.1.43ubuntu1 is an invalid version and will not be supported in a future release
warnings.warn(
Loading .env environment variables.
python --version
Python 3.10.4
OS Ubuntu 22.04
@kaykhan This issue has been reported from time to time, but unfortunately it is really challenging to figure out where pipenv could be invoking this from. Could you try the main branch of pipenv pip install git+https://github.com/pypa/pipenv.git@main and see if the error is still present?
@matteius im using pipenv, version 2022.7.24 which was released recently - https://github.com/pypa/pipenv/releases/tag/v2022.7.24
Still get the same error
is there anything else i can do to help debug?
Just looking into this further i came across another post -- apparently its an issue with "setuptools"?
https://askubuntu.com/questions/1406952/what-is-the-meaning-of-this-pkgresourcesdeprecationwarning-warning-from-pipenv
Ive not had a chance to apply the solution (downgrade) to test if that is it
Although the actual github thread the op suggest this problem does not occur in version 59. https://github.com/pypa/setuptools/issues/3278 - but in my case it does, but not sure if its the same issue or related.
pip list | grep "setuptools"
setuptools 59.6.0
Downgrading setuptools really should not be the answer. It's just a warning, you can ignore it for now until it can be figured out.
Downgrading setuptools really should not be the answer. It's just a warning, you can ignore it for now until it can be figured out.
Okay thank you, i will check back at a later date and if theres anyting else i can do/try to help let me know!
@kaykhan I would be curious to know, if you still get the error with pipenv==2022.8.24?
@matteius Upgraded pipenv for you, unfortunately i still get these errors/warnings
1. pipenv --version
/usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 1.1build1 is an invalid version and will not be supported in a future release
warnings.warn(
/usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 0.1.43ubuntu1 is an invalid version and will not be supported in a future release
warnings.warn(
pipenv, version 2022.8.15
2. pip install --upgrade pipenv
3. pipenv --version
/usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 1.1build1 is an invalid version and will not be supported in a future release
warnings.warn(
/usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 0.1.43ubuntu1 is an invalid version and will not be supported in a future release
warnings.warn(
pipenv, version 2022.8.24
The warning will show up even when entering the following:
$ pipenv help
/home/user/.local/lib/python3.8/site-packages/pkg_resources/__init__.py:123: PkgResourcesDeprecationWarning: 1.13.1-unknown is an invalid version and will not be supported in a future release
warnings.warn(
/home/user/.local/lib/python3.8/site-packages/pkg_resources/__init__.py:123: PkgResourcesDeprecationWarning: 0.23ubuntu1 is an invalid version and will not be supported in a future release
warnings.warn(
/home/user/.local/lib/python3.8/site-packages/pkg_resources/__init__.py:123: PkgResourcesDeprecationWarning: 0.1.36ubuntu1 is an invalid version and will not be supported in a future release
warnings.warn(
Usage: pipenv [OPTIONS] COMMAND [ARGS]...
Try 'pipenv -h' for help.
Error: No such command 'help'.
Did you mean one of these?
shell
This means that the problem lies before or while parsing the cmd arguments.
I am using WSL2 Ubuntu 18.04
By just checking the version, I also get this error:
$ pipenv --version
/home/sep/.local/lib/python3.6/site-packages/pkg_resources/__init__.py:119: PkgResourcesDeprecationWarning: 0.18ubuntu0.18.04.1 is an invalid version and will not be supported in a future release
PkgResourcesDeprecationWarning,
pipenv, version 2022.4.20
2022.9.20 is released
Upgrading to this new version (2022.9.20) has resolved the problem for me. thanks!

I have just come across this issue mentioned by @kaykhan previously but for me, the issue is appearing on GitHub when I was trying to run a job.
I have also tried including the "pip install git+https://github.com/pypa/pipenv.git@main" on the main branch (suggested by @matteius ) but unfortunately, I still face the same issue 😭
Hope to know if anyone knows how to resolve this? 🙏🏻
@fatraphael95 that fix was released to pypi a while ago. Is it possible you are invoking pipenv from an apt installed version?
Hi @matteius, sorry I'm quite new to this and not quite sure what you mean by invoking pipenv from an apt installed version. Currently, I have sort of resolved the earlier issue by changing from setuptools==65.x.x to setuptools==66.0.0 and right now this is the current status whereby the "1.1build1" is an invalid version.
@fatraphael95 you should not have to install main branch, this fix has long since been released in pypi -- noticed you are pip install -r requirements.txt after installing pipenv which could revert back to a version you have specified in the requirements.txt. Do you have a version of pipenv specified there that isn't the latest?
@matteius ohh i see and yes it was not the latest version. I have updated the requirement.txt file and it is working now. Thanks a lot for your kind help! :)