I am working on a package that has dependencies which require colorama<0.4.4
. Other software I install with pip requires colorama==0.4.4
. When I run poetry install
it removes colorama
entirely, which breaks software that I use.
How can I prevent colorama
from removing newer versions of packages? Whatever the reasons may be for that one dependency requiring old colorama, it works with the new one well enough for my use. I have tried:
poetry install --no-dev
(didn't work)pip install colorama==0.4.3
(poetry still says Removing colorama (0.4.4)
even though pip show colorama
reports 0.4.3
I need to add this exception for my computer only, so it should not be part of the pyproject.toml
file. The problem here is that the package technically conflicts with my userland; that is because of the particular unrelated programs I have installed. Other people developing this package might not be users of those programs, or might not care that they break.
If you use poetry, poetry will manage your venv. So whenever it detects a package in it, which conflicts with the dependencies declared in the pyproject.toml
, it will remove it. This is how it is intended and you have no way to define exceptions.
The problem here is that the package technically conflicts with my userland; that is because of the particular unrelated programs I have installed.
This is exactly the reason why you should have one venv per project you are developing on and the aim of poetry. So just let poetry create a venv for your project with the dependencies you have defined and you don't have any conflicts with unrelated packages.