Python 当u+;w未在src上设置,导致pip安装失败;在哪里报告错误?
我正在执行Python 当u+;w未在src上设置,导致pip安装失败;在哪里报告错误?,python,git,pip,shutil,panfs,Python,Git,Pip,Shutil,Panfs,我正在执行pip安装。,其中当前工作目录位于文件系统上。当pip尝试复制目录树(包括.git中的文件)时,由于os.setxattr中的最终故障,它将失败: $ pip install . Processing /home/users/gholl/checkouts/pyatmlab Exception: Traceback (most recent call last): File "/home/users/gholl/venv/stable-3.4/lib/python3.4/site-
pip安装。
,其中当前工作目录位于文件系统上。当pip
尝试复制目录树(包括.git
中的文件)时,由于os.setxattr
中的最终故障,它将失败:
$ pip install .
Processing /home/users/gholl/checkouts/pyatmlab
Exception:
Traceback (most recent call last):
File "/home/users/gholl/venv/stable-3.4/lib/python3.4/site-packages/pip/basecommand.py", line 223, in main
status = self.run(options, args)
File "/home/users/gholl/venv/stable-3.4/lib/python3.4/site-packages/pip/commands/install.py", line 280, in run
requirement_set.prepare_files(finder)
File "/home/users/gholl/venv/stable-3.4/lib/python3.4/site-packages/pip/req/req_set.py", line 317, in prepare_files
functools.partial(self._prepare_file, finder))
File "/home/users/gholl/venv/stable-3.4/lib/python3.4/site-packages/pip/req/req_set.py", line 304, in _walk_req_to_install
more_reqs = handler(req_to_install)
File "/home/users/gholl/venv/stable-3.4/lib/python3.4/site-packages/pip/req/req_set.py", line 469, in _prepare_file
session=self.session)
File "/home/users/gholl/venv/stable-3.4/lib/python3.4/site-packages/pip/download.py", line 814, in unpack_url
unpack_file_url(link, location, download_dir)
File "/home/users/gholl/venv/stable-3.4/lib/python3.4/site-packages/pip/download.py", line 699, in unpack_file_url
shutil.copytree(link_path, location, symlinks=True)
File "/home/users/gholl/lib/python3.4/shutil.py", line 343, in copytree
raise Error(errors)
shutil.Error: [('/home/users/gholl/checkouts/pyatmlab/.git/objects/pack/pack-c1449559ec4287b3830efe2913608dddf2f21391.pack', '/tmp/pip-6lrnz9vs-build/.git/objects/pack/pack-c1449559ec4287b3830efe2913608dddf2f21391.pack', "[Errno 13] Permission denied: '/tmp/pip-6lrnz9vs-build/.git/objects/pack/pack-c1449559ec4287b3830efe2913608dddf2f21391.pack'"), ('/home/users/gholl/checkouts/pyatmlab/.git/objects/pack/pack-c1449559ec4287b3830efe2913608dddf2f21391.idx', '/tmp/pip-6lrnz9vs-build/.git/objects/pack/pack-c1449559ec4287b3830efe2913608dddf2f21391.idx', "[Errno 13] Permission denied: '/tmp/pip-6lrnz9vs-build/.git/objects/pack/pack-c1449559ec4287b3830efe2913608dddf2f21391.idx'")]
更深入的挖掘表明,错误源于:
Traceback (most recent call last):
File "/home/users/gholl/lib/python3.4/shutil.py", line 329, in copytree
copy_function(srcname, dstname)
File "/home/users/gholl/lib/python3.4/shutil.py", line 246, in copy2
copystat(src, dst, follow_symlinks=follow_symlinks)
File "/home/users/gholl/lib/python3.4/shutil.py", line 213, in copystat
_copyxattr(src, dst, follow_symlinks=follow)
File "/home/users/gholl/lib/python3.4/shutil.py", line 153, in _copyxattr
os.setxattr(dst, name, value, follow_symlinks=follow_symlinks)
PermissionError: [Errno 13] Permission denied: '/tmp/pip-y3dw8fwa-build/.git/objects/pack/pack-c1449559ec4287b3830efe2913608dddf2f21391.pack' File "/home/users/gholl/lib/python3.4/shutil.py", line 329, in copytree
…并可通过以下方式复制:
In [55]: shutil.copystat("/home/users/gholl/checkouts/pyatmlab/.git/objects/pack/pack-c1449559ec4287b3830efe2913608dddf2f21391.pack", "/tmp/fubar")
---------------------------------------------------------------------------
PermissionError Traceback (most recent call last)
<ipython-input-55-139c9fc77184> in <module>()
----> 1 shutil.copystat("/home/users/gholl/checkouts/pyatmlab/.git/objects/pack/pack-c1449559ec4287b3830efe2913608dddf2f21391.pack", "/tmp/fubar")
/home/users/gholl/lib/python3.4/shutil.py in copystat(src, dst, follow_symlinks)
211 else:
212 raise
--> 213 _copyxattr(src, dst, follow_symlinks=follow)
214
215 def copy(src, dst, *, follow_symlinks=True):
/home/users/gholl/lib/python3.4/shutil.py in _copyxattr(src, dst, follow_symlinks)
151 try:
152 value = os.getxattr(src, name, follow_symlinks=follow_symlinks)
--> 153 os.setxattr(dst, name, value, follow_symlinks=follow_symlinks)
154 except OSError as e:
155 if e.errno not in (errno.EPERM, errno.ENOTSUP, errno.ENODATA):
PermissionError: [Errno 13] Permission denied: '/tmp/fubar'
[55]中的:shutil.copystat(“/home/users/gholl/checkout/pyatmlab/.git/objects/pack/pack-c1449559ec4287b3830efe2913608dddf2f21391.pack”,“/tmp/fubar”)
---------------------------------------------------------------------------
PermissionError回溯(最近一次调用上次)
在()
---->1 shutil.copystat(“/home/users/gholl/checkout/pyatmlab/.git/objects/pack/pack-c1449559ec4287b3830efe2913608dddf2f21391.pack”,“/tmp/fubar”)
/copystat中的home/users/gholl/lib/python3.4/shutil.py(src、dst、follow_符号链接)
211其他:
212提高
-->213 _copyxattr(src、dst、follow_symlinks=follow)
214
215 def副本(src、dst、*,后跟符号链接=True):
/home/users/gholl/lib/python3.4/shutil.py in_copyxattr(src、dst、follow_符号链接)
151尝试:
152 value=os.getxattr(src、name、follow\u symlinks=follow\u symlinks)
-->153 os.setxattr(dst、名称、值、follow_symlinks=follow_symlinks)
154除错误为e外:
155如果e.errno不在(errno.EPERM、errno.ENOTSUP、errno.ENODATA):
PermissionError:[Errno 13]权限被拒绝:'/tmp/fubar'
这适用于未设置用户写入位的任何源文件
现在,谁来处理这件事?这是pip
、shutil.copytree
、shutil.copystat
、setxattr
、panfs
中的一个bug,还是以上都没有
报告为。另见