Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pip install -r requirements.txt [Errno 2] No such file or directory: 'requirements.txt'

I am setting up the base for a django project, I have cloned a repo and I have just created a virtual environment for the project in the same directory. But when I try to run the command pip install -r requirements.txt in the project directory I get this error:

[Errno 2] No such file or directory: 'requirements.txt'

I believe I'm just running it in the wrong directory, but I don't really know where I should run it. Do you have any idea where the file could be located?

like image 400
siama Avatar asked Oct 20 '17 17:10

siama


1 Answers

If you are using a virtual environment just use the following line.

pip freeze > requirements.txt

It commands to create the requirements file first.

Or in dockerfile, RUN pip freeze > requirements.txt .

like image 96
Abhi Avatar answered Sep 23 '22 16:09

Abhi