question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error with `pipenv install --system` with pipenv version `2022.8.19`

See original GitHub issue

Issue description

In our pipeline we install pipenv in a docker container, to test our code. With version 2022.8.15 the command pipenv install --ignore-pipfile --system --dev works as expected. However with version 2022.8.19 it gets lots of errors like:

[pipenv.exceptions.InstallError]: /usr/local/bin/python: can't open file '/usr/local/lib/python3.8/site-packages/pipenv/patched/pip': [Errno 2] No such file or directory
ResourceWarning: Enable tracemalloc to get the object allocation traceback
sys:1: ResourceWarning: unclosed file <_io.FileIO name=14 mode='rb' closefd=True>
ResourceWarning: Enable tracemalloc to get the object allocation traceback
sys:1: ResourceWarning: unclosed file <_io.FileIO name=17 mode='rb' closefd=True>
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/usr/local/lib/python3.8/subprocess.py:946: ResourceWarning: subprocess 283 is still running

An error occurred while installing singledispatch==3.7.0; python_version >= '2.6' --hash=sha256:bc77afa97c8a22596d6d4fc20f1b7bdd2b86edc2a65a4262bdd7cc3cc19aa989 --hash=sha256:c1a4d5c1da310c3fd8fccfb8d4e1cb7df076148fd5d858a819e37fffe44f3092! Will try again.

Expected result

--system flag should work in latest version, as in previous versions, while installing in docker container

Actual result

as seen above

Steps to replicate

  • get a docker container / or gitlab pipline
  • use python 3.8.12 and run pip install pipenv
  • install a Pipfile.lock with pipenv install --ignore-pipfile --system --dev

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
FabianClemenzcommented, Aug 22, 2022

@matteius strange behaviour - tried it with pinning the version - works like a charm. I think it will be best, deleting pipenv from our Pipfiles to don’t run in that problem again. Thanks!

0reactions
matteiuscommented, Aug 22, 2022

@FabianClemenz Well its one of three things … 1.) It could be that the new patch to only include pipenv is more restrictive (intentionally because people needed to be able to pin a specific version of setuptools or pip and before it was adding the entire site directories) https://github.com/pypa/pipenv/compare/v2022.8.15...v2022.8.19#diff-75503dc50a53fd90f7c4e3871006f6c623daa212f5f289c3f4b7aba287c17f9e 2.) It could be because we no longer exclude BAD_PACKAGES which was a temporary fix until the new patch in 1 was figured out, though that seems not it because pipenv wasn’t listed in BAD_PACKAGES https://github.com/pypa/pipenv/compare/v2022.8.15...v2022.8.19#diff-ef852c4ac364f946819f765a6bc26f04f1b0968f31fc512949a60fa2ab0685e8L735 3.) It could be an side effect of using sysconfig instead of distutils (to get 1 to work): https://github.com/pypa/pipenv/compare/v2022.8.15...v2022.8.19#diff-e154923a3c93acd48d40dd714127c4b90cac776ebd71930770919d539d137f77R44

That being said, I am surprised this could have worked on 2022.8.15 because we recently renamed notpip to pip and that was after the version you were installing, plus we changed already to use the vendor’d pip in 2022.8.15 so it should have been trying to do basically the same thing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pipenv lock fails for packages with extras as of 2022.8.13 #5273
Issue description There was a regression in the ability to lock Pipfiles containing packages with extras on the 2022.8.13 release.
Read more >
Release and Version History — pipenv 2022.12.20.dev0 ...
Fix an issue when using pipenv install --system on systems that having the python executable pointing to Python 2 and a Python 3...
Read more >
pipenv Documentation - Read the Docs
Generates and checks file hashes for locked dependencies when installing from Pipfile.lock. • Automatically install required Python version when pyenv is ...
Read more >
pipenv · PyPI
You can install packages with pipenv from git and other version control systems using URLs formatted according to the following rule:
Read more >
Windows reports error when trying to install package using ...
Please check that pipenv is installed in your system by run following command in command promt: pipenv --version.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found