pip install -e 不捕获源代码中的更改
我已经用 git 克隆了一个存储库,我想尝试对源代码进行一些更改。为此,我使用 virtualenv
创建一个环境并运行 pip install -e .
(其中 .
是源代码中包含的目录setup.py
)以可编辑形式安装软件包。
问题:运行包时(激活环境后)不会捕获我对源代码所做的更改。
见解:即使环境对应的 site-packages
目录包含一个带有源代码链接的 .egg-link
文件,我已经意识到它包含源代码的“静态”副本。如果我修改该副本中的代码,则在运行代码时会反映更改。
你知道可能会发生什么吗?这是正常行为吗?感谢您的帮助。
I have cloned a repository with git and I want to try some changes in the source code. For that, I am creating an environment with virtualenv
and running pip install -e .
(where .
is the directory in the source code that contains the setup.py
) to install the package in editable form.
Problem: changes I make to the source code are not captured when I run the package (after activating the environment).
Insight: Even if the site-packages
directory corresponding to the environment contains a .egg-link
file with a link to the source code, I have realized that it contains a "static" copy of the source code. If I modify the code in that copy, the changes are reflected when I run the code.
Do you know what may be happening? Is this the normal behaviour? Thank you for your help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论