gpt4 book ai didi

python - 使用 pip 安装 PIL 时出错

转载 作者:太空宇宙 更新时间:2023-11-03 13:20:05 25 4
gpt4 key购买 nike

我正在尝试使用 pip 使用命令安装 PIL:pip install PIL

但我收到以下错误,我不知道这意味着什么。有人可以帮帮我吗。

nishant@nishant-Inspiron-1545:~$ pip install PIL
Requirement already satisfied (use --upgrade to upgrade): PIL in /usr/lib/python2.7/dist-packages/PIL
Cleaning up...
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 104, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 265, in run
requirement_set.cleanup_files(bundle=self.bundle)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1081, in cleanup_files
rmtree(dir)
File "/usr/lib/python2.7/dist-packages/pip/util.py", line 29, in rmtree
onerror=rmtree_errorhandler)
File "/usr/lib/python2.7/shutil.py", line 252, in rmtree
onerror(os.remove, fullname, sys.exc_info())
File "/usr/lib/python2.7/dist-packages/pip/util.py", line 46, in rmtree_errorhandler
os.chmod(path, stat.S_IWRITE)
OSError: [Errno 1] Operation not permitted: '/home/nishant/build/pip-delete-this-directory.txt'

Storing complete log in /home/nishant/.pip/pip.log
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
load_entry_point('pip==1.1', 'console_scripts', 'pip-2.7')()
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 116, in main
return command.main(args[1:], options)
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 141, in main
log_fp = open_logfile(log_fn, 'w')
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 168, in open_logfile
log_fp = open(filename, mode)
IOError: [Errno 13] Permission denied: '/home/nishant/.pip/pip.log'

最佳答案

您有权限问题。尝试:

sudo pip install -U PIL

关于python - 使用 pip 安装 PIL 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16582642/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com