在命令行中運行最Python腳本時,遇到了以下幾種警告:你如何正確模塊已經加載Python的UserWarnings?
/Library/Python/2.6/site-packages/virtualenvwrapper/hook_loader.py:16: UserWarning: Module
pkg_resources was already imported from /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.pyc, but /Library/Python/2.6/site-packages is being added to sys.path
import pkg_resources
/Library/Python/2.6/site-packages/virtualenvwrapper/hook_loader.py:16: UserWarning: Module site was already imported from /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site.pyc, but /Library/Python/2.6/site-packages is being added to sys.path
import pkg_resources
我認爲這與使用分發和virtualenv中的組合做的,但要檢查是否有人在跑對此或將知道如何去解決它。
如果您安裝使用兩種不同的安裝方式(一個操作系統封裝相同的庫,可以發生,和easy_install,fi)。 – Apalala 2010-12-29 21:38:02