如何定位python包

如何定位python包,python,Python,我想手动卸载python包,因此无法使用import访问它。 我在系统中找不到该包。 当我使用这个(运行python-v)时,我有下一个输出: # /usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/declarative/clsregistry.pyc matches /usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/declarative/clsregistry.py impor

我想手动卸载python包,因此无法使用
import
访问它。 我在系统中找不到该包。 当我使用这个(运行python-v)时,我有下一个输出:

# /usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/declarative/clsregistry.pyc matches /usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/declarative/clsregistry.py
import sqlalchemy.ext.declarative.clsregistry # precompiled from /usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/declarative/clsregistry.pyc
# myfile.pyc matches myfile.py
import myfile # precompiled from myfile.pyc
myfile是我要卸载的软件包的一部分


如何定位它?

要打印模块的位置:

import myfile
myfile.__file__

要打印模块的位置,请执行以下操作:

import myfile
myfile.__file__
可能的重复可能的重复