Windows:获取 python 项目使用的所有模块/包

Use*_*645 3 python windows module package python-3.x

我有一个应用程序,现在我想知道如果其他人想安装它,需要哪些包/模块。如何获取特定项目所需的所有 python 模块/包?

重要提示:这个问题已经针对 Linux 得到了解答。他们建议pipreqs,这似乎是一个很好的解决方案,但它不支持 Windows

我的Python版本是3.6.4。

我正在 Windows 10 上工作。

小智 5

您是否已验证 pipreqs 不起作用?我使用 Windows 10(内部版本 17134.285)、Python 3.7.0 和 pipreqs 0.4.9;我已经使用 pipreqs 成功生成了需求文件。

C:\l\Projects\MicrosoftGraph>pipreqs .\sampleGraphAuthPython
INFO: Successfully saved requirements file in .\sampleGraphAuthPython\requirements.txt

C:\l\Projects\MicrosoftGraph>type .\sampleGraphAuthPython\requirements.txt
bottle==0.12.13
adal==1.1.0
Flask_OAuthlib==0.9.5
requests==2.19.1
Flask==1.0.2
requests_oauthlib==1.0.0
urllib3==1.23
Run Code Online (Sandbox Code Playgroud)