Search code examples
pythonpipvirtualenvpython-venv

pip install -r requirements.txt not working properly


Whenever I make a new virtual environment to start a new project and create a reuirements.txt file in it, the terminal just doesn't except the request of installing all the libraries listed in the requirements folder, it just does nothing.

I tried moving the project folder to my main Local Disk(C),if I try to manually install any library it works perfectly fine but not when i tell it access the list. Also Tried a list with just 2-3 modules listed without any conflicting dependencies. Also pip is up-to-date as well.Here's What happens aka Nothing


Solution

  • First, make sure requirement.txt is readable.

    type requirements.txt  # Windows
    cat requirements.txt  # Mac
    

    Then you can try it with verbose output to see what is actually happening:

    pip install -r requirements.txt -v
    

    You can also check pip version used in your virtual environment:

    pip --version
    

    There might also be an issue in content of the requirement.txt.