我试图重新安装pip由于我尝试安装新库时发生的错误,甚至当我尝试卸载pip本身时.
我到达那个要求确认的部分然后给我错误.它抛出的错误如下(这是执行"pip uninstall pip"时抛出的错误):
例外:
Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 211, in main status = self.run(options,args) File "/usr/local/lib/python2.7/dist-packages/pip/commands/uninstall.py", line 76, in run requirement_set.uninstall(auto_confirm=options.yes) File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 305, in uninstall req.uninstall(auto_confirm=auto_confirm) File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 716, in uninstall paths_to_remove.remove(auto_confirm) File "usr/local/lib/python2.7/dist-packages/pip/req/req_uninstall.py", line 125, in remove renames(path, new_path) File "usr/local/lib/python2.7/dist-packages/pip/utils.__init__.py", line 315, in renames shutil.move(old, new) File "/usr/lib/python2.7/shutil.py", line 303, in move os.unlink(src) OSError: [Errno 13] Permission denied: '/usr/local/bin/pip'`
pazitos10.. 6
您正在尝试在用户没有写权限的目录上安装一些Python包.你必须先做sudo
:
sudo pip install
或者您可以使用virtualenv,并在不使用sudo的情况下安装软件包.
您正在尝试在用户没有写权限的目录上安装一些Python包.你必须先做sudo
:
sudo pip install
或者您可以使用virtualenv,并在不使用sudo的情况下安装软件包.