Python: how to edit an installed package?

前端 未结 2 1065
忘掉有多难
忘掉有多难 2020-11-28 20:15

I installed some package via pip install something. I want to edit the source code for the package something. Where is it (on ubuntu 12.04) and how

2条回答
  •  感动是毒
    2020-11-28 20:57

    You can edit the files installed in /usr/local/lib/python2.7/dist-packages/. Do note that you will have to use sudo or become root. The better option would be to use virtual environment for your development. Then you can edit the files installed with your permissions inside your virtual environment.

提交回复
热议问题