IndexError: list index out of range using pip
IndexError: list index out of range using pip
我正在使用 pip 1.5.4,我正在尝试使用以下命令为 python 安装 Google 客户端 API:
sudo pip install --upgrade google-api-python-client
但我收到一个异常:
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122,
in main status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line
278, in run requirement_set.prepare_files(finder,
force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1260, in
prepare_files)[0]
IndexError: list index out of range
我尝试使用以下命令升级 pip:
sudo pip install -U pip
但它给出了与 above.Please 提出解决方案相同的异常。
我认为它是重复的:
pip install broken (pkg_resources.find_distribution returns empty list in req.py-prepare_files)
所以,解决方案可以是:
pip install --no-use-wheel --upgrade distribute
我正在使用 pip 1.5.4,我正在尝试使用以下命令为 python 安装 Google 客户端 API:
sudo pip install --upgrade google-api-python-client
但我收到一个异常:
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122,
in main status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line
278, in run requirement_set.prepare_files(finder,
force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1260, in
prepare_files)[0]
IndexError: list index out of range
我尝试使用以下命令升级 pip:
sudo pip install -U pip
但它给出了与 above.Please 提出解决方案相同的异常。
我认为它是重复的: pip install broken (pkg_resources.find_distribution returns empty list in req.py-prepare_files)
所以,解决方案可以是:
pip install --no-use-wheel --upgrade distribute