I have a long list of dependencies for my project. pip install -r requirements.txt
in an empty (virtual) environment takes several minutes. I wanted to update several packages and I'm now stuck a cycle of pip aborting the install because of conflicts and me resolving them. Isn't there a way where I can check for conflicts before installing a hundred packages?
Asked
Active
Viewed 444 times
2
-
1In case there are already things installed in your virtual environment, you could try `pip check`, maybe it will show things that can be fixed before installing the `requirements.txt`. – sinoroc Feb 03 '23 at 09:35
-
@sinoroc unfortunately no, I'm building a docker container that runs pip install on creation. – Pichler Feb 03 '23 at 09:52
-
1How was the `requirements.txt` file generated? -- Maybe you should also focus on speeding up the installation in the container. For example, you could mount *pip*'s download and build cache directories as volumes; or make sure that nothing gets built from source distribution but gets directly installed from wheels instead. – sinoroc Feb 03 '23 at 10:23
-
@sinoroc I think you're right. Seems like there's a lot I could still improve. Thank you! – Pichler Feb 03 '23 at 10:59
-
1You need to get as fast as possible to the point where pip fails to find a solution so that you can fix `requirements.txt` and restart. – sinoroc Feb 03 '23 at 11:01
-
You might also want to give [_`pipgrip`_](https://pypi.org/project/pipgrip/) a try. – sinoroc Feb 04 '23 at 18:11