--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:
- Created a year ago
- Comments:16 (13 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

but you wouldn’t declare an explicit dependency on
pkg_resources, you’d declare a dependency onsetuptools.So then poetry would see no reason to keep the unbundled
pkg_resourcesaroundThis 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_resourceswhich 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.