python 利用pip安装包总是失败,求教

2025-01-21 12:04:14
推荐回答(4个)
回答1:

试一下先升级pip到最新版再操作。

输入代码:

Downloading Scrapy-1.1.1-py2.py3-none-any.whl (295kB): 295kB downloaded
Cleaning up...


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



Storing debug log for failure in /home/jwwplus/.pip/pip.log

回答2:

试一下先升级pip到最新版再操作。

sudo pip install -U pip
sudo pip install Scrapy

回答3:

sudo pip install

你加上sudo

回答4:

遇到类似问题,请问你发现是为什么了么?