I’m working with AWS Lambda functions for the first time (and python first time as well) and in performing an AWS operation I got the message that pipenv
had to be installed. The problem is, looking at pipenv
for TW there is no build that is not broken and the newest one is last year which leads me to to believe that TW has abandoned pipenv
. Looking for alternatives it looks like TW is going the way of supporting pyenv
instead.
Has anyone come across this and more importantly knows of a solution?
I tried to uninstall/re-install pipenv
but after it uninstall it was unavailable to install again. However, while I did have it, it gave this error trying to run it.
> pipenv
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/pipenv/patched/pip/_vendor/pkg_resources/__init__.py", line 583, in _build_master
ws.require(__requires__)
File "/usr/lib/python3.9/site-packages/pipenv/patched/pip/_vendor/pkg_resources/__init__.py", line 900, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3.9/site-packages/pipenv/patched/pip/_vendor/pkg_resources/__init__.py", line 791, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pipenv.patched.pip._vendor.pkg_resources.ContextualVersionConflict: (platformdirs 3.5.1 (/usr/lib/python3.9/site-packages), Requirement.parse('platformdirs<4,>=3.9.1'), {'virtualenv'})
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/pipenv", line 33, in <module>
sys.exit(load_entry_point('pipenv==2023.3.20', 'console_scripts', 'pipenv')())
File "/usr/bin/pipenv", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib64/python3.9/importlib/metadata.py", line 86, in load
module = import_module(match.group('module'))
File "/usr/lib64/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/usr/lib/python3.9/site-packages/pipenv/__init__.py", line 64, in <module>
from .cli import cli
File "/usr/lib/python3.9/site-packages/pipenv/cli/__init__.py", line 1, in <module>
from .command import cli # noqa
File "/usr/lib/python3.9/site-packages/pipenv/cli/command.py", line 7, in <module>
from pipenv.cli.options import (
File "/usr/lib/python3.9/site-packages/pipenv/cli/options.py", line 4, in <module>
from pipenv.project import Project
File "/usr/lib/python3.9/site-packages/pipenv/project.py", line 19, in <module>
from pipenv.environment import Environment
File "/usr/lib/python3.9/site-packages/pipenv/environment.py", line 21, in <module>
from pipenv.patched.pip._vendor import pkg_resources
File "/usr/lib/python3.9/site-packages/pipenv/patched/pip/_vendor/pkg_resources/__init__.py", line 3252, in <module>
def _initialize_master_working_set():
File "/usr/lib/python3.9/site-packages/pipenv/patched/pip/_vendor/pkg_resources/__init__.py", line 3235, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3.9/site-packages/pipenv/patched/pip/_vendor/pkg_resources/__init__.py", line 3264, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python3.9/site-packages/pipenv/patched/pip/_vendor/pkg_resources/__init__.py", line 585, in _build_master
return cls._build_from_requirements(__requires__)
File "/usr/lib/python3.9/site-packages/pipenv/patched/pip/_vendor/pkg_resources/__init__.py", line 598, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/lib/python3.9/site-packages/pipenv/patched/pip/_vendor/pkg_resources/__init__.py", line 786, in resolve
raise DistributionNotFound(req, requirers)
pipenv.patched.pip._vendor.pkg_resources.DistributionNotFound: The 'platformdirs<4,>=3.9.1' distribution was not found and is required by virtualenv
which is moot since the only versions for TW are out of date and broken so no sense in trying to troubleshoot this, I just put it here for completeness.