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.

--sync removes pkg-resources, leading to pillow error

See original GitHub issue
  • Poetry version: 1.2.1
  • Python version: 3.8.10
  • OS version and name: Ubuntu 20.04.3 LTS
  • pyproject.toml:
[tool.poetry]
name = "test1"
version = "0.1.0"
description = ""
authors = ["Claudia"]

[tool.poetry.dependencies]
python = "~3.8"

[tool.poetry.dev-dependencies]

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

Issue

When running poetry install --sync, poetry removes anything pre-installed (as it should), unfortunately this includes pkg-resources (see #2673 for a discussion), which is pre-installed. Removing this package leads to an error when trying to then poetry add pillow, as discussed in #5104.

I also tried this with Poetry 1.2.0b2, mentioned in #5104 - same problem.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:16 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
dimblebycommented, Oct 11, 2022

but you wouldn’t declare an explicit dependency on pkg_resources, you’d declare a dependency on setuptools.

So then poetry would see no reason to keep the unbundled pkg_resources around

0reactions
neersightedcommented, Oct 18, 2022

This is presumably because setuptools is required by an optional dependency you are not installing, so Poetry considers it a managed package. You do explicitly depend on pkg_resources which is shipped with setuptools, so it is correct to declare a dependency.

It’s hard to provide more insight without seeing your pyproject.toml – I suggest asking in Discord or on Discussions if you have more questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix "pip installation error on pillow" - Stack Overflow
It is a maze of twisty passages, mostly dead ends." So your best bet is to downgrade to python 3.7 and do the...
Read more >
Bug listing with status RESOLVED with resolution OBSOLETE ...
o.lock to be removed" displayed by libtool in infinite loop (e.g. app-crypt/gpgme-0.3.14-r1)" status:RESOLVED resolution:OBSOLETE severity:normal ...
Read more >
Python Packaging Guidelines - Fedora Docs
Python packages have several different names, which should be kept in sync but will sometimes differ for historical or practical reasons. They are:....
Read more >
PyInstaller Documentation - Read the Docs
PyInstaller runs on macOS 10.15 (Catalina) or newer. It can build graphical windowed apps (apps that do not use a terminal window).
Read more >
CVE-2021-27922 - Vulners
Pillow before 8.1.1 allows attackers to cause a denial of service (memory consumption) because the reported size of a contained image is not ......
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