通过自制软件安装一些Python模块后,homebrew告诉我运行以下代码.
我不再需要那些模块了,想要清理一切.我可以删除(我应该吗?)删除此条目?我怎么删除它?
Python modules have been installed and Homebrew’s site-packages is not
in your Python sys.path, so you will not be able to import the modules
this formula installed. If you plan to develop with these modules,
please run:
mkdir -p /Users/rain/.local/lib/python2.7/site-packages
echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> /Users/USERNAME/.local/lib/python2.7/site-packages/homebrew.pth
Mac OsX 10.10.2
解决方法:
如果您没有使用任何Homebrew安装的python模块,您可以安全地删除/Users/USERNAME/.local/lib/python2.7/site-packages/homebrew.pth.
.pth文件是一种向sys.path添加路径的方法.作为路径的.pth文件中的行被添加到sys.path;执行以import开头的.pth文件中的行.
homebrew.pth文件中以import开头的行使得Homebrew前缀下的site-packages目录成为一个特殊的site-packages目录,它将它们添加到sys.path并确保读取和处理它包含的任何.pth文件.
原文地址:https://codeday.me/bug/20190628/1318376.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。