PVlib 安装为可编辑库,用于 PyCharm

PVlib install as an editable library to be used in PyCharm

我正在使用 PyCharm 作为 IDE 并且想使用 PVlib 的可编辑版本。

我已按照下面 link 中的说明进行操作,并在名为 pvlib_dev 的虚拟环境中通过 conda 安装了 PVlib。 pvlib_dev 虚拟环境需要在使用前通过 conda 激活,我无法 link 这部分 PyCharm。任何反馈,建议将不胜感激。

https://pvlib-python.readthedocs.io/en/stable/installation.html

谢谢。 巴兰

您需要 select 按照以下说明从 PyCharm 项目设置的 conda 虚拟环境:Configure a Python interpreter. Scroll down to the section on Setting an existing Python interpreter 并在 python 中输入 python 可执行文件的路径=10=] 康达环境。

谢谢!我还发现了另一种方法,它可能与 Mark 上面建议的解决方案一样 Pythonic:

  1. 我已经在 Github
  2. 中 fork 了 PV-Lib 存储库
  3. 将此分支克隆到我计算机的本地文件夹中
  4. 在Pycharm中,在project settings/project structure下,在'Add Content Root'下添加克隆的PV-lib repo的本地路径。
  5. 只要我将此本地路径添加到 'Add Content Root' 并导入此 PV-lib 存储库,我在本地 PV-lib 存储库中所做的任何修改/更改现在都会反映在我的项目中。