我在Yosemite(10.10.2)上运行Python 2.7.9,我的pip安装出错了。
我无法再使用get-pip.py
安装pip:
sth:~ $ sudo python get-pip.py
Traceback (most recent call last):
File "get-pip.py", line 20204, in <module>
main()
File "get-pip.py", line 152, in main
bootstrap(tmpdir=tmpdir)
File "get-pip.py", line 130, in bootstrap
sys.exit(pip.main(["install", "--upgrade"] + packages + args))
File "/tmp/tmpdUeSSr/pip.zip/pip/__init__.py", line 217, in main
File "/tmp/tmpdUeSSr/pip.zip/pip/basecommand.py", line 183, in main
File "/tmp/tmpdUeSSr/pip.zip/pip/compat/dictconfig.py", line 565, in dictConfig
File "/tmp/tmpdUeSSr/pip.zip/pip/compat/dictconfig.py", line 332, in configure
AttributeError: 'module' object has no attribute '_handlerList'
我可以使用easy_install
,然后在/usr/local/bin
中创建一个符号链接,但是尝试使用它进行安装会给我带来同样的错误:
sth:~ $ sudo pip install twine
Traceback (most recent call last):
File "/usr/local/bin/pip", line 9, in <module>
load_entry_point('pip==6.0.8', 'console_scripts', 'pip')()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-6.0.8-py2.7.egg/pip/__init__.py", line 217, in main
return command.main(cmd_args)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-6.0.8-py2.7.egg/pip/basecommand.py", line 183, in main
for name in ["pip._vendor", "distlib", "requests", "urllib3"]
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-6.0.8-py2.7.egg/pip/compat/dictconfig.py", line 565, in dictConfig
dictConfigClass(config).configure()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-6.0.8-py2.7.egg/pip/compat/dictconfig.py", line 332, in configure
del logging._handlerList[:]
AttributeError: 'module' object has no attribute '_handlerList'
我确定这不是pip的问题,所以想知道我做错了什么......
答案 0 :(得分:5)
对不起,但是为了其他googlers:
正如here指出的那样,你应该不使用app.post('/get_more_posts', function(req, res) {
db.select_post({
last_received_id: req.body.last_received_id
}, function(query_res) {
var rendered = res.render('more-posts', {
_POST_LIST: helper.prepare_posts_for_rendering(query_res)
});
res.status(200).send({ rendered: rendered });
});
});
安装file1
,因为它会弄乱系统版本。我不确定这种情况何时发生了变化。
因此,删除openssl aes-256-cbc -a -salt -in file1 -out file1.enc -k secret
应该会删除错误。
答案 1 :(得分:0)
我在一小时前发现了类似的错误并发现了这个问题。 但是我刚刚解决了这个问题。 虽然您可能认为它没有用,但我希望这个答案可以帮助您解决问题。
事实上,当我使用 virtualenvwrapper 时,我想突然控制一个ENV。 所以我创建了一个备份目录,原因是在另一个ENV所在的同一目录中。
之后, .virtualenv 中不仅有2个ENV,还有3个与ENV相关的目录。 它为网站包提供了一些途径,等等显然改变了helter-skelter。
这就是为什么,如果你没有确认关于 Virtualenv 的文件,我建议你这样做。
我的错误如下。
~ pip freeze
Traceback (most recent call last):
File "/usr/local/bin/pip", line 9, in <module>
load_entry_point('pip==6.0.6', 'console_scripts', 'pip')()
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/__init__.py", line 217, in main
return command.main(cmd_args)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/basecommand.py", line 183, in main
for name in ["pip._vendor", "distlib", "requests", "urllib3"]
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/compat/dictconfig.py", line 565, in dictConfig
dictConfigClass(config).configure()
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/compat/dictconfig.py", line 332, in configure
del logging._handlerList[:]
AttributeError: 'module' object has no attribute '_handlerList'