3

Imagine the following situation:

  1. I'm working on a python project, and I install the library antigravity with pip.

  2. I add the function fly() which uses the library, and I commit and push the changes.

  3. Some time after, my partner(s) run git pull.

How do they know that they should install the new library? By failing to run the program? Because I told them so? Should the library install automatically? Is there any easy way of doing that?

For context, in case it's relevant, I'm using python 3 and the project is stored at github. Thanks.

asked Feb 8, 2019 at 14:32
6
  • 3
    This is what requirements files are for. Most workflows that reuse/automate Git usage will also automate package management , driven by a requirements.txt file. Commented Feb 8, 2019 at 14:54
  • 2
    This question was already asked and answered in 2011 on Stackoverflow. See also this link Commented Feb 8, 2019 at 17:14
  • In C#, the Nuget package manager handles this; dependencies on third-party libraries are listed in a separate file (or the project file) and downloaded automatically if they don't exist on the machine. Is there something similar for python? Commented Feb 8, 2019 at 17:15
  • @mmathis: see my comment above. Commented Feb 8, 2019 at 17:18
  • 2
    @GuillermoMosse: thanks, but I don't write answers for things where I can only contribute a link (and the community here is strictly against link-only answers as well). I think, however, you should have invested a little bit more search effort into your question before asking, it took me less than a minute to find those links on Google. Try keywords "python automatic dependency" by yourself, you will find plenty of more links. Commented Feb 9, 2019 at 9:01

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.