Back

Explore Courses Blog Tutorials Interview Questions
0 votes
20 views
in Python by (47.6k points)

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?

1 Answer

0 votes
by (106k points)
edited by

If you are using Linux as your OS then you can follow the below-mentioned steps:-

  1. Firstly, remove matplotlib==1.3.1 from requirements.txt

  2. After that try to install it with sudo apt-get install python-matplotlib

  3. Run pip install -r requirements.txt (Python 2), or pip3 install -r requirements.txt (Python 3)

  4. pip freeze > requirements.txt

If you are using Windows as your OS then use the following steps:-

  1. python -m pip install -U pip setuptools

  2. python -m pip install matplotlib

To know more about this you can have a look at the following video tutorial:-

To Learn what is python then visit this Data Science with Python Course.

Wanna become an Expert in python? Come & join our Python Certification course

Browse Categories

...