M
M
mkone1122020-11-14 03:17:14
Python
mkone112, 2020-11-14 03:17:14

What is the most preferred way to manage dependencies?

I'm trying to choose an alternative to pip & virtualenv & pyenv. There are a lot of tools - for example poetry, pip-tools, pyflow , conda, DepHell (kind of buggy). While stopped on pipenv, in connection with which the following questions appeared.

  • Am I shooting myself in the foot? What problems can pipenv create compared to the built-in tools?
  • Is there an even better alternative to pipenv?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Roman Kitaev, 2020-11-14
@mkone112

I'll put in my 5 cents. I switch to Pipenv and was disappointed in it as much as possible. In a small project with ~30 dependencies, any update or installation of a simple lib (without compilations, pure python. For example, loguru or pydantic) takes about 3-7 minutes of time, sometimes up to half an hour (literally).
A ticket has been hanging on the github since 2018 about this, on which the developers put (. https://github.com/pypa/pipenv/issues/2284 ) At the same time, yarn and npm put orders of magnitude more dependencies in orders of magnitude shorter time . With the same functionality - environment reproducibility, conflict resolution.
Tried poetry. It looks better, at least not as long, but still long. But it has no integrations anywhere (I'm interested in PyCharm). There is a third party plugin that didn't work for me.
As a result, after releasing several projects on Pipenv, I rolled back to pip and manual environment management. Because I can't stand to wait so long to install the simplest libraries. In python, there is no way that I know of to properly manage dependencies, as in JS / TS.

M
Maxim Dunayevsky, 2020-11-14
@dunmaksim

Put the file REQUIREMENTS.txt in the root of the project and call pip like this:
pip install -r REQUIREMENTS.txt

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question