pipenv icon indicating copy to clipboard operation
pipenv copied to clipboard

Error with pipenv on pop os 22.04

Open DWAA1660 opened this issue 3 years ago • 7 comments

Issue description

Im on a freshly installed PopOS with python 3.10.4 installed. Every time i run pipenv shell or anything related it has error Traceback (most recent call last): File "/usr/bin/pipenv", line 33, in <module> sys.exit(load_entry_point('pipenv==11.9.0', 'console_scripts', 'pipenv')()) File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 722, in __call__ return self.main(*args, **kwargs) File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 696, in main with self.make_context(prog_name, args, **extra) as ctx: File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 621, in make_context self.parse_args(ctx, args) File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 1018, in parse_args rest = Command.parse_args(self, ctx, args) File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 875, in parse_args parser = self.make_parser(ctx) File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 821, in make_parser for param in self.get_params(ctx): File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 774, in get_params help_option = self.get_help_option(ctx) File "/usr/lib/python3/dist-packages/pipenv/cli.py", line 26, in get_help_option from .import core File "/usr/lib/python3/dist-packages/pipenv/core.py", line 21, in <module> import requests File "/usr/lib/python3/dist-packages/pipenv/vendor/requests/__init__.py", line 65, in <module> from . import utils File "/usr/lib/python3/dist-packages/pipenv/vendor/requests/utils.py", line 28, in <module> from .structures import CaseInsensitiveDict File "/usr/lib/python3/dist-packages/pipenv/vendor/requests/structures.py", line 15, in <module> class CaseInsensitiveDict(collections.MutableMapping): AttributeError: module 'collections' has no attribute 'MutableMapping'

Expected result

makes a virtual environment

Actual result

Has error and fails

Steps to replicate

Install python3.10 (3.9 i think aswell). install pipenv run 'pipenv'

DWAA1660 avatar Jul 18 '22 05:07 DWAA1660

@DWAA1660 Works fine for me on python 3.10 but I am not running PopOS. -- I googled and found this might be helpful for you: https://stackoverflow.com/questions/69512672/getting-attributeerror-module-collections-has-no-attribute-mutablemapping-w

matteius avatar Jul 18 '22 07:07 matteius

@DWAA1660 Is this still an issue for you? If so can you provide a Dockerfile that replicate the problem?

matteius avatar Aug 11 '22 06:08 matteius

Still an issue for me, OS: Ubuntu 22.04 LTS. Same steps to reproduce. python 3.10.4 pip 22.2.2 from /usr/lib/python3.10/site-packages/pip (python 3.10)

francescoluciano avatar Aug 11 '22 08:08 francescoluciano

Those are not valid reproduction steps. Please provide a Dockerfile that utilizes the OS you are referring to.

matteius avatar Aug 11 '22 12:08 matteius

@matteius I'm having the same issue, or at least very similar. The pipenv command cannot run as it throws ImportError: cannot import name 'Mapping' from 'collections'.

Made a Dockerfile to reproduce:

FROM ubuntu:22.04

RUN apt-get update
RUN apt-get --yes install pipenv

CMD ["pipenv"]

jadlers avatar Aug 11 '22 18:08 jadlers

@jadlers The apt repository for pipenv is very old -- you're best off installing it from pypi or the git repository. We have a get-pipenv.py script but its outdated at this point and needs an update.

matteius avatar Aug 11 '22 18:08 matteius

@matteius I understand, I choose apt since it's shown on the list of installation options.

jadlers avatar Aug 14 '22 10:08 jadlers

Same problem here. If the installation via apt doesn't work, it should be removed accordingly.

major-mayer avatar Jan 16 '23 09:01 major-mayer

That is an easy PR change that anyone can open a PR for -- apt version hasn't been updated in years.

matteius avatar Jan 16 '23 13:01 matteius