S
S
Stanislav Shabalin2020-08-27 14:26:24
Django
Stanislav Shabalin, 2020-08-27 14:26:24

Installing similar dependencies in new Django projects?

Tell me, do I understand correctly that for each project in its virtual environment it is necessary to re-install the same packages with their dependencies that have already been installed?

For example, I installed sorl-thumbnal. It is also recommended to install additional packages to it:
$ brew install graphicsmagick
$ brew install boost-python3
$ pip install pgmagick

And if I start a new similar project, and do not create a separate application in the project, will I have to repeat everything above?
Is that correct, or can you still use the same packages for different projects without new installations?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dr. Bacon, 2020-08-27
@Starck43

It's time to learn about pip freeze > requirements.txtand pip install -r requirements.txt
PS with experience you will understand that this may not be enough and it is better to start using pipenv or poetry

Is that correct, or can you still use the same packages for different projects without new installations?
it seemed like it was possible to use system packages, but it’s better not to do this, and keep your own dependencies for each project, since very often different projects need different versions.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question