为什么 Pycharm 的 venv 中的依赖项与使用 venv 的代码中的依赖项不同?

Why are the dependencies in Pycharm's venv not the same as those in the code using the venv?

提问人:Guziko 提问时间:11/16/2023 更新时间:11/16/2023 访问量:17

问:

我试图弄清楚发生了什么,但没有成功......

我想为基于 arcpy 库的脚本准备一个文档。代码工作正常,所有导入都成功。但是由于某种原因,Pycharm 中 Python 解释器下列出的依赖项与代码中列出的依赖项不同,即使该脚本似乎使用了完全相同的 venv(查看屏幕截图)。

在这种情况下生成 requirements.txt 文件的最简单方法是什么?

提前致谢!

enter image description hereenter image description hereenter image description here

蟒蛇 pycharm python-venv

评论


答: 暂无答案