[英]Where can I find a python source file by the import?
There is this line in a python class file, and I am trying to find the python file that defines the PeieApi python类文件中有此行,我正在尝试查找定义PeieApi的python文件
from peieapi.peieapi import PeieApi
I've recursively searched in the project folder for "class PeieApi", didn't find it. 我已经在项目文件夹中递归搜索“ class PeieApi”,但没有找到它。
I've check the directory where this file is located for any file or directory with the name peieapi, didn't find any. 我已经检查了该文件所在的目录中是否有名称为peieapi的任何文件或目录,但未找到任何文件或目录。
So, where else can I find the source file that defines this python class PeieApi? 因此,在哪里还能找到定义此python类PeieApi的源文件?
It was actually installed into this directory by pip when running the project installation script. 运行项目安装脚本时,它实际上是通过pip安装到此目录中的。 I saw it showed up from the list returned by this command. 我从该命令返回的列表中看到了它。
pip list
Seems if it's not in the project directory, it will be in the global python library directory, in my case on a Mac, it's in 似乎它不在项目目录中,而是在全局python库目录中,在我的Mac上,它位于
/usr/local/lib/python2.7/site-packages/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.