删除已安装包中的CPython文件

huangapple go评论63阅读模式
英文:

remove cpython files in installed packages

问题

我之前通过PyCharm安装了一个包。我对包的源代码进行了一些更改,但发现PyCharm仍然运行旧版本,并且我发现PyCharm实际上是在运行由旧代码生成的Cpython编译的.so版本。有没有办法强制PyCharm重新运行Cpython,或者只是解释源代码?我尝试删除所有的Cpython .so文件,但这导致PyCharm崩溃,所以我想其中一些Cpython文件实际上是必需的。

英文:

I installed a package via pycharm earlier. I made some changes to the package's source code but found that pycharm would still run the old version, and I discovered that pycharm was actually running the cpython compiled .so version instead generated from the old code. Is there a way to force pycharm to rerun cpython or just interpret the source code instead? I tried removing all the cpython .so files but that causes the pycharm to segfault, so I suppose some of those cpython files are actually needed.

答案1

得分: 0

你真的不应该直接编辑这些包,这很容易在以后变得麻烦。如果你真的觉得需要编辑这个包,我建议遵循上面链接中的建议,因为它可以防止你破坏东西。

英文:

https://stackoverflow.com/questions/23075397/python-how-to-edit-an-installed-package

You really shouldn't be editing these packages directly, it can easily become a headache down the road. I would recommend following the advice in the above link if you really feel like you need to edit the package, because it keeps you from, well, breaking things.

huangapple
  • 本文由 发表于 2023年2月18日 10:47:21
  • 转载请务必保留本文链接:https://go.coder-hub.com/75490865.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定