Make poetry prefer a system-site-package and not update #9876
Unanswered
truschival
asked this question in
Q&A
Replies: 1 comment
-
The current workaround is to build a wheel with I wish for a command line argument of |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
[x] I have searched the issues and haven't found a duplicate
[x] I have searched discussions and think 1879 could be related because this is what I use.
Scenario: I have a docker container provided by nvidia, including pytorch (
torch 2.2.0a0+6a974be
) and python 3.10.12. I want to install my package in the docker image using the available packages as dependency and not update unnesessarilyMy stripped-down package now only depends on
python = "~3.10"
andtorch = ">=2.0.1, <3"
.I have created a virtual-env with
--system-site-packages
(and for cargo-cult I also set the flag inPOETRY_VIRTUALENVS_OPTIONS_SYSTEM_SITE_PACKAGES=true
)If I list the packages with pip in the virtual environment I see the correct torch version an can use it.
When calling poetry install (without existing lockfile) poetry wants to update torch to 2.5.1.
The available versions match the dependency range of my package, there is no need to update. Why does poetry update, and how can I stop it form updating.
I don't want to restrict the version range of my package because it works on other setups as well with a more recent torch version. I want to avoid installing the recent version in the docker container and rely on the vendors setup.
Beta Was this translation helpful? Give feedback.
All reactions