Prepare the necessary library of python like gemfile of ruby so that the package required by Project can be done in one shot like bundle install

background

When using a project in Python, there is not enough Library and an error occurs, or the version is different and an error occurs (?), So create something like Ruby's Gemfile and need the required Library and Version. I tried to find out if there was something that could be managed in one shot.

Google

Get to the link python equivalent of a ruby gemfile (http://stackoverflow.com/questions/19280249/python-equivalent-of-a-ruby-gem-file)

  1. pip install mypackage

2. Describe the required Library and Version in requirements.txt

requirements.txt


django==1.5
fabric>1.2
South==0.7.3

3. Install with pip install -r requirements.txt

Then you can install what you wrote!

With this, I was able to do what I wanted to do.

It's a little too easy, but if I'm using it and have something to add, I'll add it each time.

4. Display version with pip freeze

https://pip.pypa.io/en/stable/reference/pip_freeze/

5. Save to requirements.txt with pip freeze> requirements.txt

reference

http://stackoverflow.com/questions/19280249/python-equivalent-of-a-ruby-gem-file

Recommended Posts

Prepare the necessary library of python like gemfile of ruby so that the package required by Project can be done in one shot like bundle install
How to install a Python library that can be used by pharmaceutical companies
A mechanism to call a Ruby method from Python that can be done in 200 lines
I tried to summarize the contents of each package saved by Python pip in one line
Investigation of DC power supplies that can be controlled by Python