newBike
newBike

Reputation: 15002

How to generate required packages automatically

I gave my friends a project. and I use lots of 3rd part packages among the scripts.

How could I generate all the necessary packages automatically.

Otherwise,

my friend should run my script and catch the exception and install the missing package, again and again.

By the way, is it possible to install all the necessary packages at once ?

# -*- coding: utf8 -*-
from flask import request, url_for
from flask import json
from flask import Response
from flask import Flask, request, jsonify
from flask_request_params import bind_request_params
import datetime
import pandas as pd
import pymongo
import pdb
from webargs import Arg
from webargs.flaskparser import use_args, use_kwargs
import urlparse
from mongo import Mongo
import yaml
import time, functools
from functools import wraps
from pdb import set_trace
from flask import g
from pandas_helper import PandasHelper
import errors

Upvotes: 0

Views: 51

Answers (1)

poke
poke

Reputation: 387687

That’s what requirement files in pip are for:

"Requirements files" are files containing a list of items to be installed using pip install

Basically they document your dependencies, so when you do a pip install later, pip will get all the required dependencies to run your script.

Upvotes: 2

Related Questions