我想手动卸载python包,因此无法使用import
访问它。
我找不到我的系统中的包。
当我使用此advice(运行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是我要卸载的软件包的一部分。
我如何找到它?
答案 0 :(得分:6)
打印模块的位置:
import myfile
myfile.__file__