问题描述
pip install kitti2bag的时候,报错如下:
File "/usr/bin/pip", line 9, in <module>
from pip import main
ImportError: cannot import name main
解决方案
cd ~
cd /usr/bin
gedit pip
将pip文件的最后几行替换为:
from pip import __main__
if __name__ == '__main__':
sys.exit(__main__._main())
看下python中main的内容:
/usr/local/lib/python2.7/dist-packages/pip
gedit __main__.py
from pip._internal import main as _main # isort:skip # noqa
if name == 'main':
sys.exit(_main())
网友评论