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

pipenv install fails ver: 2021.11.5.post0 #4847

Closed
vvvlc opened this issue Nov 8, 2021 · 10 comments
Closed

pipenv install fails ver: 2021.11.5.post0 #4847

vvvlc opened this issue Nov 8, 2021 · 10 comments

Comments

@vvvlc
Copy link

vvvlc commented Nov 8, 2021

Issue description

When running the latest version 2021.11.5.post0 then pipenv install it fails with
FileNotFoundError: [Errno 2] No such file or directory: '/var/Jenkins17/workspace/xxx/.pyenv-python3.8/lib64/python3.8/site-packages/pip/_vendor/certifi/cacert.pem'

Expected result

All packages got installed.

Actual result

$ /usr/bin/python3.8 --version
$ /usr/bin/python3.8 -m venv /var/Jenkins17/workspace/db2tools-environment/db2tools-new-instance-prod/.pyenv-python3.8
+ which python3
/var/Jenkins17/workspace/db2tools-environment/db2tools-new-instance-prod/.pyenv-python3.8/bin/python3
+ python3 -V
Python 3.8.6
+ python3 -m pip install --upgrade pipenv
Collecting pipenv
  Downloading https://files.pythonhosted.org/packages/6e/df/7e4a059f7479142843ec771dfe556e9d407a01ec727c16a15ab880a9b84f/pipenv-2021.11.5.post0-py2.py3-none-any.whl (3.9MB)
Collecting virtualenv
  Using cached https://files.pythonhosted.org/packages/ac/8a/05e8d8a3ac88a3c4ebec1fe2b1b4730e6e6ebdddb52cfd6cea6803de4624/virtualenv-20.10.0-py2.py3-none-any.whl
Collecting certifi
  Using cached https://files.pythonhosted.org/packages/37/45/946c02767aabb873146011e665728b680884cd8fe70dde973c640e45b775/certifi-2021.10.8-py2.py3-none-any.whl
Requirement already satisfied, skipping upgrade: setuptools>=36.2.1 in ./.pyenv-python3.8/lib/python3.8/site-packages (from pipenv) (41.6.0)
Collecting virtualenv-clone>=0.2.5
  Using cached https://files.pythonhosted.org/packages/21/ac/e07058dc5a6c1b97f751d24f20d4b0ec14d735d77f4a1f78c471d6d13a43/virtualenv_clone-0.5.7-py3-none-any.whl
Requirement already satisfied, skipping upgrade: pip>=18.0 in ./.pyenv-python3.8/lib/python3.8/site-packages (from pipenv) (19.3.1)
Collecting six<2,>=1.9.0
  Using cached https://files.pythonhosted.org/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl
Collecting backports.entry-points-selectable>=1.0.4
  Using cached https://files.pythonhosted.org/packages/0c/cd/1e156227cad9f599524eb10af62a2362f872910a49402dbd2bea2dedc91c/backports.entry_points_selectable-1.1.0-py2.py3-none-any.whl
Collecting distlib<1,>=0.3.1
  Using cached https://files.pythonhosted.org/packages/28/36/4bdfb663826d6deedc30b179a7b7876a86943cec9fcfc3f1638489fd8b09/distlib-0.3.3-py2.py3-none-any.whl
Collecting filelock<4,>=3.2
  Using cached https://files.pythonhosted.org/packages/31/24/ee722b92f23b9ebd87783e893a75352c048bbbc1f67dce0d63b58b46cb48/filelock-3.3.2-py3-none-any.whl
Collecting platformdirs<3,>=2
  Using cached https://files.pythonhosted.org/packages/b1/78/dcfd84d3aabd46a9c77260fb47ea5d244806e4daef83aa6fe5d83adb182c/platformdirs-2.4.0-py3-none-any.whl
Installing collected packages: six, backports.entry-points-selectable, distlib, filelock, platformdirs, virtualenv, certifi, virtualenv-clone, pipenv
Successfully installed backports.entry-points-selectable-1.1.0 certifi-2021.10.8 distlib-0.3.3 filelock-3.3.2 pipenv-2021.11.5.post0 platformdirs-2.4.0 six-1.16.0 virtualenv-20.10.0 virtualenv-clone-0.5.7
WARNING: You are using pip version 19.3.1; however, version 21.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
+ export CI=1
+ CI=1
+ pipenv install
Traceback (most recent call last):
  File "/var/Jenkins17/workspace/db2tools-environment/db2tools-new-instance-prod/.pyenv-python3.8/bin/pipenv", line 5, in <module>
    from pipenv import cli
  File "/var/Jenkins17/workspace/db2tools-environment/db2tools-new-instance-prod/.pyenv-python3.8/lib64/python3.8/site-packages/pipenv/__init__.py", line 55, in <module>
    from .cli import cli
  File "/var/Jenkins17/workspace/db2tools-environment/db2tools-new-instance-prod/.pyenv-python3.8/lib64/python3.8/site-packages/pipenv/cli/__init__.py", line 1, in <module>
    from .command import cli    # noqa
  File "/var/Jenkins17/workspace/db2tools-environment/db2tools-new-instance-prod/.pyenv-python3.8/lib64/python3.8/site-packages/pipenv/cli/command.py", line 6, in <module>
    from pipenv.cli.options import (
  File "/var/Jenkins17/workspace/db2tools-environment/db2tools-new-instance-prod/.pyenv-python3.8/lib64/python3.8/site-packages/pipenv/cli/options.py", line 3, in <module>
    from pipenv.project import Project
  File "/var/Jenkins17/workspace/db2tools-environment/db2tools-new-instance-prod/.pyenv-python3.8/lib64/python3.8/site-packages/pipenv/project.py", line 31, in <module>
    from pipenv.vendor.requirementslib.models.utils import (
  File "/var/Jenkins17/workspace/db2tools-environment/db2tools-new-instance-prod/.pyenv-python3.8/lib64/python3.8/site-packages/pipenv/vendor/requirementslib/__init__.py", line 7, in <module>
    from .models.lockfile import Lockfile
  File "/var/Jenkins17/workspace/db2tools-environment/db2tools-new-instance-prod/.pyenv-python3.8/lib64/python3.8/site-packages/pipenv/vendor/requirementslib/models/lockfile.py", line 14, in <module>
    from ..utils import is_editable, is_vcs, merge_items
  File "/var/Jenkins17/workspace/db2tools-environment/db2tools-new-instance-prod/.pyenv-python3.8/lib64/python3.8/site-packages/pipenv/vendor/requirementslib/utils.py", line 11, in <module>
    import pip_shims.shims
  File "/var/Jenkins17/workspace/db2tools-environment/db2tools-new-instance-prod/.pyenv-python3.8/lib/python3.8/site-packages/pipenv/vendor/pip_shims/__init__.py", line 26, in <module>
    from . import shims
  File "/var/Jenkins17/workspace/db2tools-environment/db2tools-new-instance-prod/.pyenv-python3.8/lib/python3.8/site-packages/pipenv/vendor/pip_shims/shims.py", line 12, in <module>
    from .models import (
  File "/var/Jenkins17/workspace/db2tools-environment/db2tools-new-instance-prod/.pyenv-python3.8/lib/python3.8/site-packages/pipenv/vendor/pip_shims/models.py", line 775, in <module>
    Command.add_mixin(SessionCommandMixin)
  File "/var/Jenkins17/workspace/db2tools-environment/db2tools-new-instance-prod/.pyenv-python3.8/lib/python3.8/site-packages/pipenv/vendor/pip_shims/models.py", line 689, in add_mixin
    mixin = mixin.shim()
  File "/var/Jenkins17/workspace/db2tools-environment/db2tools-new-instance-prod/.pyenv-python3.8/lib/python3.8/site-packages/pipenv/vendor/pip_shims/models.py", line 737, in shim
    result = self.traverse(top_path)
  File "/var/Jenkins17/workspace/db2tools-environment/db2tools-new-instance-prod/.pyenv-python3.8/lib/python3.8/site-packages/pipenv/vendor/pip_shims/models.py", line 729, in traverse
    result = shim.shim()
  File "/var/Jenkins17/workspace/db2tools-environment/db2tools-new-instance-prod/.pyenv-python3.8/lib/python3.8/site-packages/pipenv/vendor/pip_shims/models.py", line 575, in shim
    imported = self._import()
  File "/var/Jenkins17/workspace/db2tools-environment/db2tools-new-instance-prod/.pyenv-python3.8/lib/python3.8/site-packages/pipenv/vendor/pip_shims/models.py", line 600, in _import
    result = self._import_module(self.calculated_module_path)
  File "/var/Jenkins17/workspace/db2tools-environment/db2tools-new-instance-prod/.pyenv-python3.8/lib/python3.8/site-packages/pipenv/vendor/pip_shims/models.py", line 352, in _import_module
    imported = importlib.import_module(module)
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/var/Jenkins17/workspace/db2tools-environment/db2tools-new-instance-prod/.pyenv-python3.8/lib64/python3.8/site-packages/pipenv/patched/notpip/_internal/cli/req_command.py", line 15, in <module>
    from pipenv.patched.notpip._internal.cache import WheelCache
  File "/var/Jenkins17/workspace/db2tools-environment/db2tools-new-instance-prod/.pyenv-python3.8/lib64/python3.8/site-packages/pipenv/patched/notpip/_internal/cache.py", line 13, in <module>
    from pipenv.patched.notpip._internal.exceptions import InvalidWheelFilename
  File "/var/Jenkins17/workspace/db2tools-environment/db2tools-new-instance-prod/.pyenv-python3.8/lib64/python3.8/site-packages/pipenv/patched/notpip/_internal/exceptions.py", line 8, in <module>
    from pipenv.patched.notpip._vendor.requests.models import Request, Response
  File "/var/Jenkins17/workspace/db2tools-environment/db2tools-new-instance-prod/.pyenv-python3.8/lib64/python3.8/site-packages/pipenv/patched/notpip/_vendor/requests/__init__.py", line 135, in <module>
    from . import utils
  File "/var/Jenkins17/workspace/db2tools-environment/db2tools-new-instance-prod/.pyenv-python3.8/lib64/python3.8/site-packages/pipenv/patched/notpip/_vendor/requests/utils.py", line 41, in <module>
    DEFAULT_CA_BUNDLE_PATH = certs.where()
  File "/var/Jenkins17/workspace/db2tools-environment/db2tools-new-instance-prod/.pyenv-python3.8/lib64/python3.8/site-packages/pipenv/patched/notpip/_vendor/certifi/core.py", line 51, in where
    _CACERT_PATH = str(_CACERT_CTX.__enter__())
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/contextlib.py", line 113, in __enter__
    return next(self.gen)
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/importlib/resources.py", line 201, in path
    with open_binary(package, resource) as fp:
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/importlib/resources.py", line 91, in open_binary
    return reader.open_resource(resource)
  File "<frozen importlib._bootstrap_external>", line 988, in open_resource
FileNotFoundError: [Errno 2] No such file or directory: '/var/Jenkins17/workspace/xxx/.pyenv-python3.8/lib64/python3.8/site-packages/pip/_vendor/certifi/cacert.pem'

File /var/Jenkins17/workspace/xxx/.pyenv-python3.8/lib64/python3.8/site-packages/pip/_vendor/certifi/cacert.pem does not exists but version 2021.5.29 works fine.

Steps to replicate

pipenv install

CentOS Linux release 7.9.2009 (Core)

+ pipenv --support
Traceback (most recent call last):
  File "/var/Jenkins17/workspace/db2tools-environment/devtest/db2tools-new-instance-qa@2/.pyenv-python3.8/bin/pipenv", line 5, in <module>
    from pipenv import cli
  File "/var/Jenkins17/workspace/db2tools-environment/devtest/db2tools-new-instance-qa@2/.pyenv-python3.8/lib64/python3.8/site-packages/pipenv/__init__.py", line 55, in <module>
    from .cli import cli
  File "/var/Jenkins17/workspace/db2tools-environment/devtest/db2tools-new-instance-qa@2/.pyenv-python3.8/lib64/python3.8/site-packages/pipenv/cli/__init__.py", line 1, in <module>
    from .command import cli    # noqa
  File "/var/Jenkins17/workspace/db2tools-environment/devtest/db2tools-new-instance-qa@2/.pyenv-python3.8/lib64/python3.8/site-packages/pipenv/cli/command.py", line 6, in <module>
    from pipenv.cli.options import (
  File "/var/Jenkins17/workspace/db2tools-environment/devtest/db2tools-new-instance-qa@2/.pyenv-python3.8/lib64/python3.8/site-packages/pipenv/cli/options.py", line 3, in <module>
    from pipenv.project import Project
  File "/var/Jenkins17/workspace/db2tools-environment/devtest/db2tools-new-instance-qa@2/.pyenv-python3.8/lib64/python3.8/site-packages/pipenv/project.py", line 31, in <module>
    from pipenv.vendor.requirementslib.models.utils import (
  File "/var/Jenkins17/workspace/db2tools-environment/devtest/db2tools-new-instance-qa@2/.pyenv-python3.8/lib64/python3.8/site-packages/pipenv/vendor/requirementslib/__init__.py", line 7, in <module>
    from .models.lockfile import Lockfile
  File "/var/Jenkins17/workspace/db2tools-environment/devtest/db2tools-new-instance-qa@2/.pyenv-python3.8/lib64/python3.8/site-packages/pipenv/vendor/requirementslib/models/lockfile.py", line 14, in <module>
    from ..utils import is_editable, is_vcs, merge_items
  File "/var/Jenkins17/workspace/db2tools-environment/devtest/db2tools-new-instance-qa@2/.pyenv-python3.8/lib64/python3.8/site-packages/pipenv/vendor/requirementslib/utils.py", line 11, in <module>
    import pip_shims.shims
  File "/var/Jenkins17/workspace/db2tools-environment/devtest/db2tools-new-instance-qa@2/.pyenv-python3.8/lib/python3.8/site-packages/pipenv/vendor/pip_shims/__init__.py", line 26, in <module>
    from . import shims
  File "/var/Jenkins17/workspace/db2tools-environment/devtest/db2tools-new-instance-qa@2/.pyenv-python3.8/lib/python3.8/site-packages/pipenv/vendor/pip_shims/shims.py", line 12, in <module>
    from .models import (
  File "/var/Jenkins17/workspace/db2tools-environment/devtest/db2tools-new-instance-qa@2/.pyenv-python3.8/lib/python3.8/site-packages/pipenv/vendor/pip_shims/models.py", line 775, in <module>
    Command.add_mixin(SessionCommandMixin)
  File "/var/Jenkins17/workspace/db2tools-environment/devtest/db2tools-new-instance-qa@2/.pyenv-python3.8/lib/python3.8/site-packages/pipenv/vendor/pip_shims/models.py", line 689, in add_mixin
    mixin = mixin.shim()
  File "/var/Jenkins17/workspace/db2tools-environment/devtest/db2tools-new-instance-qa@2/.pyenv-python3.8/lib/python3.8/site-packages/pipenv/vendor/pip_shims/models.py", line 737, in shim
    result = self.traverse(top_path)
  File "/var/Jenkins17/workspace/db2tools-environment/devtest/db2tools-new-instance-qa@2/.pyenv-python3.8/lib/python3.8/site-packages/pipenv/vendor/pip_shims/models.py", line 729, in traverse
    result = shim.shim()
  File "/var/Jenkins17/workspace/db2tools-environment/devtest/db2tools-new-instance-qa@2/.pyenv-python3.8/lib/python3.8/site-packages/pipenv/vendor/pip_shims/models.py", line 575, in shim
    imported = self._import()
  File "/var/Jenkins17/workspace/db2tools-environment/devtest/db2tools-new-instance-qa@2/.pyenv-python3.8/lib/python3.8/site-packages/pipenv/vendor/pip_shims/models.py", line 600, in _import
    result = self._import_module(self.calculated_module_path)
  File "/var/Jenkins17/workspace/db2tools-environment/devtest/db2tools-new-instance-qa@2/.pyenv-python3.8/lib/python3.8/site-packages/pipenv/vendor/pip_shims/models.py", line 352, in _import_module
    imported = importlib.import_module(module)
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/var/Jenkins17/workspace/db2tools-environment/devtest/db2tools-new-instance-qa@2/.pyenv-python3.8/lib64/python3.8/site-packages/pipenv/patched/notpip/_internal/cli/req_command.py", line 15, in <module>
    from pipenv.patched.notpip._internal.cache import WheelCache
  File "/var/Jenkins17/workspace/db2tools-environment/devtest/db2tools-new-instance-qa@2/.pyenv-python3.8/lib64/python3.8/site-packages/pipenv/patched/notpip/_internal/cache.py", line 13, in <module>
    from pipenv.patched.notpip._internal.exceptions import InvalidWheelFilename
  File "/var/Jenkins17/workspace/db2tools-environment/devtest/db2tools-new-instance-qa@2/.pyenv-python3.8/lib64/python3.8/site-packages/pipenv/patched/notpip/_internal/exceptions.py", line 8, in <module>
    from pipenv.patched.notpip._vendor.requests.models import Request, Response
  File "/var/Jenkins17/workspace/db2tools-environment/devtest/db2tools-new-instance-qa@2/.pyenv-python3.8/lib64/python3.8/site-packages/pipenv/patched/notpip/_vendor/requests/__init__.py", line 135, in <module>
    from . import utils
  File "/var/Jenkins17/workspace/db2tools-environment/devtest/db2tools-new-instance-qa@2/.pyenv-python3.8/lib64/python3.8/site-packages/pipenv/patched/notpip/_vendor/requests/utils.py", line 41, in <module>
    DEFAULT_CA_BUNDLE_PATH = certs.where()
  File "/var/Jenkins17/workspace/db2tools-environment/devtest/db2tools-new-instance-qa@2/.pyenv-python3.8/lib64/python3.8/site-packages/pipenv/patched/notpip/_vendor/certifi/core.py", line 51, in where
    _CACERT_PATH = str(_CACERT_CTX.__enter__())
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/contextlib.py", line 113, in __enter__
    return next(self.gen)
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/importlib/resources.py", line 201, in path
    with open_binary(package, resource) as fp:
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/importlib/resources.py", line 91, in open_binary
    return reader.open_resource(resource)
  File "<frozen importlib._bootstrap_external>", line 988, in open_resource
FileNotFoundError: [Errno 2] No such file or directory: '/var/Jenkins17/workspace/db2tools-environment/devtest/db2tools-new-instance-qa@2/.pyenv-python3.8/lib64/python3.8/site-packages/pip/_vendor/certifi/cacert.pem'
@petrblaho
Copy link

I am experiencing the exact same issue too...

@frostming
Copy link
Contributor

Can you try to figure out after which step the file disappears? It seems not a fault of pipenv

@petrblaho
Copy link

petrblaho commented Nov 8, 2021

I am using https://github.com/openshift/source-to-image/ inside a container on python app (so s2i uses this https://github.com/sclorg/s2i-python-container).

This is the command which is failing for me pipenv install --deploy https://github.com/sclorg/s2i-python-container/blob/master/3.8/s2i/bin/assemble#L73 .

When I pin down pipenv version in Dockerfile using ENV PIN_PIPENV_VERSION=2021.5.29 it works.

Previous command is https://github.com/sclorg/s2i-python-container/blob/master/3.8/s2i/bin/assemble#L31 which results in

Successfully installed backports.entry-points-selectable-1.1.0 certifi-2021.10.8 distlib-0.3.3 filelock-3.3.2 pipenv-2021.5.29 platformdirs-2.4.0 six-1.16.0 virtualenv-20.10.0 virtualenv-clone-0.5.7

when pipenv is pinned to 2021.5.29 or in

Successfully installed backports.entry-points-selectable-1.1.0 certifi-2021.10.8 distlib-0.3.3 filelock-3.3.2 pipenv-2021.11.5.post0 platformdirs-2.4.0 six-1.16.0 virtualenv-20.10.0 virtualenv-clone-0.5.7

when we leave it to install latest pipenv.

During the whole run of that https://github.com/sclorg/s2i-python-container/blob/master/3.8/s2i/bin/assemble script there is no /opt/app-root/src/.local/venvs/pipenv/lib64/python3.8/site-packages/pip/_vendor/certifi/cacert.pem file nor /opt/app-root/src/.local/venvs/pipenv/lib64/python3.8/site-packages/pip/_vendor/certifi/ directory at all in both cases.

@frenzymadness
Copy link
Contributor

Hello. Maintainer of s2i-python-container here. I'm gonna try to debug the issue.

@petrblaho
Copy link

When I run pipenv just before the step that fails I got the same failure with this stacktrace:

Traceback (most recent call last):
  File "/opt/app-root/src/.local/bin/pipenv", line 5, in <module>
    from pipenv import cli
  File "/opt/app-root/src/.local/venvs/pipenv/lib64/python3.8/site-packages/pipenv/__init__.py", line 55, in <module>
    from .cli import cli
  File "/opt/app-root/src/.local/venvs/pipenv/lib64/python3.8/site-packages/pipenv/cli/__init__.py", line 1, in <module>
    from .command import cli    # noqa
  File "/opt/app-root/src/.local/venvs/pipenv/lib64/python3.8/site-packages/pipenv/cli/command.py", line 6, in <module>
    from pipenv.cli.options import (
  File "/opt/app-root/src/.local/venvs/pipenv/lib64/python3.8/site-packages/pipenv/cli/options.py", line 3, in <module>
    from pipenv.project import Project
  File "/opt/app-root/src/.local/venvs/pipenv/lib64/python3.8/site-packages/pipenv/project.py", line 31, in <module>
    from pipenv.vendor.requirementslib.models.utils import (
  File "/opt/app-root/src/.local/venvs/pipenv/lib64/python3.8/site-packages/pipenv/vendor/requirementslib/__init__.py", line 7, in <module>
    from .models.lockfile import Lockfile
  File "/opt/app-root/src/.local/venvs/pipenv/lib64/python3.8/site-packages/pipenv/vendor/requirementslib/models/lockfile.py", line 14, in <module>
    from ..utils import is_editable, is_vcs, merge_items
  File "/opt/app-root/src/.local/venvs/pipenv/lib64/python3.8/site-packages/pipenv/vendor/requirementslib/utils.py", line 11, in <module>
    import pip_shims.shims
  File "/opt/app-root/src/.local/venvs/pipenv/lib/python3.8/site-packages/pipenv/vendor/pip_shims/__init__.py", line 26, in <module>
    from . import shims
  File "/opt/app-root/src/.local/venvs/pipenv/lib/python3.8/site-packages/pipenv/vendor/pip_shims/shims.py", line 12, in <module>
    from .models import (
  File "/opt/app-root/src/.local/venvs/pipenv/lib/python3.8/site-packages/pipenv/vendor/pip_shims/models.py", line 775, in <module>
    Command.add_mixin(SessionCommandMixin)
  File "/opt/app-root/src/.local/venvs/pipenv/lib/python3.8/site-packages/pipenv/vendor/pip_shims/models.py", line 689, in add_mixin
    mixin = mixin.shim()
  File "/opt/app-root/src/.local/venvs/pipenv/lib/python3.8/site-packages/pipenv/vendor/pip_shims/models.py", line 737, in shim
    result = self.traverse(top_path)
  File "/opt/app-root/src/.local/venvs/pipenv/lib/python3.8/site-packages/pipenv/vendor/pip_shims/models.py", line 729, in traverse
    result = shim.shim()
  File "/opt/app-root/src/.local/venvs/pipenv/lib/python3.8/site-packages/pipenv/vendor/pip_shims/models.py", line 575, in shim
    imported = self._import()
  File "/opt/app-root/src/.local/venvs/pipenv/lib/python3.8/site-packages/pipenv/vendor/pip_shims/models.py", line 600, in _import
    result = self._import_module(self.calculated_module_path)
  File "/opt/app-root/src/.local/venvs/pipenv/lib/python3.8/site-packages/pipenv/vendor/pip_shims/models.py", line 352, in _import_module
    imported = importlib.import_module(module)
  File "/usr/lib64/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/opt/app-root/src/.local/venvs/pipenv/lib64/python3.8/site-packages/pipenv/patched/notpip/_internal/cli/req_command.py", line 15, in <module>
    from pipenv.patched.notpip._internal.cache import WheelCache
  File "/opt/app-root/src/.local/venvs/pipenv/lib64/python3.8/site-packages/pipenv/patched/notpip/_internal/cache.py", line 13, in <module>
    from pipenv.patched.notpip._internal.exceptions import InvalidWheelFilename
  File "/opt/app-root/src/.local/venvs/pipenv/lib64/python3.8/site-packages/pipenv/patched/notpip/_internal/exceptions.py", line 8, in <module>
    from pipenv.patched.notpip._vendor.requests.models import Request, Response
  File "/opt/app-root/src/.local/venvs/pipenv/lib64/python3.8/site-packages/pipenv/patched/notpip/_vendor/requests/__init__.py", line 135, in <module>
    from . import utils
  File "/opt/app-root/src/.local/venvs/pipenv/lib64/python3.8/site-packages/pipenv/patched/notpip/_vendor/requests/utils.py", line 41, in <module>
    DEFAULT_CA_BUNDLE_PATH = certs.where()
  File "/opt/app-root/src/.local/venvs/pipenv/lib64/python3.8/site-packages/pipenv/patched/notpip/_vendor/certifi/core.py", line 51, in where
    _CACERT_PATH = str(_CACERT_CTX.__enter__())
  File "/usr/lib64/python3.8/contextlib.py", line 113, in __enter__
    return next(self.gen)
  File "/usr/lib64/python3.8/importlib/resources.py", line 201, in path
    with open_binary(package, resource) as fp:
  File "/usr/lib64/python3.8/importlib/resources.py", line 91, in open_binary
    return reader.open_resource(resource)
  File "<frozen importlib._bootstrap_external>", line 988, in open_resource
FileNotFoundError: [Errno 2] No such file or directory: '/opt/app-root/src/.local/venvs/pipenv/lib64/python3.8/site-packages/pip/_vendor/certifi/cacert.pem'

@frenzymadness
Copy link
Contributor

Our pip in Fedora/Centos is patched to use system-wide installed certificates instead of the one bundled in certifi which is then bundled in pip, see: https://src.fedoraproject.org/rpms/python-pip/blob/f34/f/dummy-certifi.patch

The main problem is:

_CACERT_CTX = get_path("pip._vendor.certifi", "cacert.pem")

Why pipenv tries to load certificates from pip when it bundles it's own copy of certifi and the file is right next to the core.py mentioned above?

@frostming
Copy link
Contributor

Fixed by 4d1df95

@frostming
Copy link
Contributor

Released: v2021.11.9

@vvvlc
Copy link
Author

vvvlc commented Nov 10, 2021

I confirm that 2021.11.9 solves the issue, thx for the quick fix.

@petrblaho
Copy link

I can confirm that loading that cacert.pem file is solved now. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants