How to freeze packages installed only in the virtual environment?

前端 未结 7 920
情歌与酒
情歌与酒 2020-12-23 16:43

How to freeze packages installed only in the virtual environment, that is, without the global ones?

7条回答
  •  不知归路
    2020-12-23 16:45

    You need to use the -l or --local option to freeze only the local packages (and not the global ones)

    pip freeze -l > requirements.txt 
    

    Make sure you are working in the virtualenv before doing pip freeze -l.

提交回复
热议问题