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

后端 未结 5 1032
滥情空心
滥情空心 2020-12-02 08:46

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 inst         


        
5条回答
  •  有刺的猬
    2020-12-02 09:31

    Python 3:

    pip3 install -r requirements.txt
    

    Python 2:

    pip install -r requirements.txt
    

    To get all the dependencies for the virtual environment or for the whole system:

    pip freeze
    

    To push all the dependencies to the requirements.txt (Linux):

    pip freeze > requirements.txt
    

提交回复
热议问题