問題描述
在 anaconda 環境中安裝包后,我想對該包中的代碼進行一些更改.
After installing a package in an anaconda environment, I'll like to make some changes to the code in that package.
在哪里可以找到包含已安裝軟件包的 site-packages
目錄?我沒有找到目錄 /Users/username/anaconda/lib/python2.7/site-packages
Where can I find the site-packages
directory containing the installed packages? I do not find a directory /Users/username/anaconda/lib/python2.7/site-packages
推薦答案
您可以導入模塊并檢查 module.__file__
字符串.它包含相關源文件的路徑.
You can import the module and check the module.__file__
string. It contains the path to the associated source file.
或者,您可以閱讀模塊文檔中的 File
標記,可以使用 help(module)
或 module?
在 IPython 中.
Alternatively, you can read the File
tag in the the module documentation, which can be accessed using help(module)
, or module?
in IPython.
這篇關于Anaconda 站點包的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!