How to use requirements.txt to install all dependencies in a python project

Python

I am new to python. Recently I got a project written by python and it requires some installation. I run below command to install but got an error.

# pip install requirements.txt 

Collecting requirements.txt 

Could not find a version that satisfies the requirement requirements.txt (from versions: ) 

No matching distribution found for requirements.txt

Below is my requirements.txt file:

# cat requirements.txt 

ordereddict==1.1 

argparse==1.2.1 

python-dateutil==2.2 

matplotlib==1.3.1 

nose==1.3.0 

numpy==1.8.0 

pymongo==3.3.0 

psutil>=2.0


Is there an easy way to install all the required dependencies in this python project?

3
Answers

Replies


You can just run this command to install all the dependencies from a requirements.txt file.



python -m pip install -r requirements.txt


 

 


If you are using Python 2.x,



pip install -r requirements.txt



If you are using Python 3.x,



pip3 install -r requirements.txt


 

 
 

If you want to unleash your potential in this competitive field, please visit the Python course page for more information, where you can find the Python tutorials and Python frequently asked interview questions and answers as well.

 

This topic has been locked/unapproved. No replies allowed

Login to participate in this discussion.

Leave a reply

Before proceeding, please check your email for a verification link. If you did not receive the email, click here to request another.