Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poetry 1.0.0 always updates site-packages, is this expected behaviour? #1732

Closed
2 tasks done
sirmarcel opened this issue Dec 13, 2019 · 5 comments
Closed
2 tasks done

Comments

@sirmarcel
Copy link

sirmarcel commented Dec 13, 2019

I've noticed that with 1.0.0, poetry is now always updating packages in site-packages, even if no different version is available and no update is necessary:

  - Updating numpy (1.17.4 ~/conda-envs/clean_py37/lib/python3.7/site-packages -> 1.17.4)

In this case, it replaces numpy with the same version, but installed via poetry and not conda.

If this is the expected behaviour, it catastrophically breaks my workflow for having a fast numpy (i.e. the conda distribution linked against mkl) coexist with proper dependency management via poetry.

Currently, I (and many colleagues in the high performance computing corner) do the following:

  • Create a minimal conda environment with numpy, scipy
  • Create a venv with --system-site-packages, install poetry, disable venv creation with poetry
  • Create a pyproject.toml specifying the exact numpy version already installed, and additional dependencies that poetry should manage

This results in (largely) properly managed dependencies for "pure python" packages and fast numerical packages. With this change, this is no longer possible.

  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

Thanks, Marcel.

@jstriebel
Copy link
Contributor

See also #1711, seems to be a duplicate.

@sirmarcel
Copy link
Author

Yes, looks like the same problem! So I guess it's not expected behaviour. Should I close this?

@finswimmer
Copy link
Member

finswimmer commented Dec 13, 2019

Closing as a duplicate of #1711.

@etijskens
Copy link

I would like to deploy my projects on a HPC cluster. On this system Python versions are made available by loading modules, and they come with a number of pre-installed python packages that are optimised for our hardware, e.g. numpy 1.17.0. I create a virtual environment in the project root directory like this:

python -m venv .venv --system-site-packages

In this way the optimised Numpy is visible in the virtual environment. My project has a dependency
numpy = "^1.17.0" specified in the pyproject.toml file. When running poetry install it updates to the latest numpy 1.17.4. The newly installed numpy is not optimised for our hardware and in addition it consumes a lot of my file quota on the machine. This is certainly not desired behaviour, at least not in my case. Is there a way to tell poetry not to update if there is a version available that satisfies the version specification?

Copy link

github-actions bot commented Mar 3, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants