In Node.js, for a project we create a package.json file, which lists all the dependencies, so that NPM can automatically install them.
Is there an equivalent way to do this with Python ?
Node has npm
similarly python having pip
pip is a package management system used to install and manage software packages written in Python.
So first you need to install pip,
sudo apt-get install python-pip
You have to keep your requirements in requirements.txt
in you project folder as like package.json
in nodejs
.
eg:
pip install package1
pip install package2
pip install package3
Then move on to your project path, then do this:
pip install -r requirements.txt
You can use pip freeze > requirements.txt
to generate dependencies list, and use pip install -r requirements.txt
to install all dependencies.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With