简体   繁体   English

Python中的Requirements.txt文件

[英]Requirements.txt file in Python

I am trying to show python libraries in requirements.txt by using "pip freeze > requirements.txt" and my virtual environment is still activated. 我正在尝试通过使用“ pip Frozen> requirements.txt”在requirements.txt中显示python库,并且我的虚拟环境仍处于激活状态。

But instead of getting my current virtual env's libraries, I am getting all the libraries in my requirements.txt file that i used in other environment earlier. 但是,不是获取当前虚拟环境的库,而是获取我之前在其他环境中使用的我的requirements.txt文件中的所有库。

What is the issue? 有什么问题

Your virtualenv is certainly messed up. 您的virtualenv当然被搞砸了。

To find the packages which are not required, run: 要查找不需要的软件包,请运行:

pip list --not-required

But, I think it's time to recreate your virtualenv. 但是,我认为是时候重新创建您的virtualenv了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM