[MacPorts] #63320: pipenv @2021.5.29_0 crashing after update to 2.7.1

MacPorts noreply at macports.org
Fri Jul 30 09:56:49 UTC 2021


#63320: pipenv @2021.5.29_0 crashing after update to 2.7.1
----------------------------+--------------------
 Reporter:  leofiore        |      Owner:  (none)
     Type:  defect          |     Status:  new
 Priority:  Normal          |  Milestone:
Component:  ports           |    Version:  2.7.1
 Keywords:  mojave, x86_64  |       Port:  pipenv
----------------------------+--------------------
 i recently updated my macports base from 2.6.4 to 2.7.1 and, with this, my
 installation of pipenv. In my environment i use python38 as default
 python3 installation, so all of my virtualenvs are created for this
 version of python. I ran pipenv and it fails immediatly with this error

 {{{
 leonardo at leda.local$ pipenv
 Traceback (most recent call last):
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/pkg_resources/__init__.py", line 568, in _build_master
     ws.require(__requires__)
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/pkg_resources/__init__.py", line 886, in require
     needed = self.resolve(parse_requirements(requirements))
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/pkg_resources/__init__.py", line 777, in resolve
     raise VersionConflict(dist, req).with_context(dependent_req)
 pkg_resources.ContextualVersionConflict: (platformdirs 0.0.0
 (/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages), Requirement.parse('platformdirs<3,>=2'), {'virtualenv'})

 During handling of the above exception, another exception occurred:

 Traceback (most recent call last):
   File "/opt/local/bin/pipenv", line 33, in <module>
     sys.exit(load_entry_point('pipenv==2021.5.29', 'console_scripts',
 'pipenv')())
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/pipenv/vendor/click/core.py", line 829, in __call__
     return self.main(*args, **kwargs)
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/pipenv/vendor/click/core.py", line 781, in main
     with self.make_context(prog_name, args, **extra) as ctx:
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/pipenv/vendor/click/core.py", line 700, in make_context
     self.parse_args(ctx, args)
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/pipenv/vendor/click/core.py", line 1212, in parse_args
     rest = Command.parse_args(self, ctx, args)
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/pipenv/vendor/click/core.py", line 1044, in parse_args
     parser = self.make_parser(ctx)
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/pipenv/vendor/click/core.py", line 965, in make_parser
     for param in self.get_params(ctx):
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/pipenv/vendor/click/core.py", line 912, in get_params
     help_option = self.get_help_option(ctx)
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/pipenv/cli/options.py", line 27, in get_help_option
     from ..core import format_help
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/pipenv/core.py", line 33, in <module>
     from .project import Project
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/pipenv/project.py", line 24, in <module>
     from .environment import Environment
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/pipenv/environment.py", line 16, in <module>
     import pkg_resources
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/pkg_resources/__init__.py", line 3243, in <module>
     def _initialize_master_working_set():
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/pkg_resources/__init__.py", line 3226, in _call_aside
     f(*args, **kwargs)
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/pkg_resources/__init__.py", line 3255, in
 _initialize_master_working_set
     working_set = WorkingSet._build_master()
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/pkg_resources/__init__.py", line 570, in _build_master
     return cls._build_from_requirements(__requires__)
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/pkg_resources/__init__.py", line 583, in
 _build_from_requirements
     dists = ws.resolve(reqs, Environment())
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/pkg_resources/__init__.py", line 772, in resolve
     raise DistributionNotFound(req, requirers)
 pkg_resources.DistributionNotFound: The 'platformdirs<3,>=2' distribution
 was not found and is required by virtualenv
 }}}


 since the error involes virtualenv, i tried to switch to virtualenv39 via
 {{{sudo port select --set virtualenv virtualenv39}}}. The error persists.
 Launching virtualenv (3.9) by command line successfully creates a new
 environment.

 I tried to reinstall a previous version of pipenv ( @2020.8.13 ) but it
 shows me the error message {{{Error: pipenv version 2020.8.13 is not
 available (current version is 2021.5.29_0)}}}

-- 
Ticket URL: <https://trac.macports.org/ticket/63320>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list