Python: How to install a third-party package and make it available to rest of team
My team uses git to track the code and we want to do the following: (1) One team-member installs a third-party python package and (2) makes it available on our git repo, so that the rest of the team can simply install the package by pulling the latest version of our code.
Is that possible at all? If so, what are feasible solutions? If not, what approach works best in your experience?
Background: We are using python 2.7.*. The third-party package is testfixtures to unittest the logging of our software. We use Windows and Mac.
One Solution collect form web for “Python: How to install a third-party package and make it available to rest of team”
Create a requirements.txt file and place it in your directory. Each line in the file should contain the name of a package that your entire team should have installed. Your team members, once they have the new version of the file, can run
pip install -r requirements.txt. Then, update the requirements.txt file every time you have a new package required, and rerun the command.
Some editors (like PyCharm) will even automatically detect a requirements file and prompt you to install the packages.