如何安装Python扩展模块pyxattr?

Python

1 基础知识

– pyxattr是Python的一个扩展模块
– pyxattr用于访问某些系统中可用的文件系统对象的扩展属性

2 最佳实践

2.1 系统环境

OS = RHEL 8
IP Addresses = any
Host Name = any

2.2 安装pyxattr

2.2.1 下载软件包

cd ~
wget https://pyxattr.k1024.org/downloads/pyxattr-0.6.1.tar.gz

2.2.2 安装下载的软件包

cd ~
pip3 install pyxattr-0.6.1.tar.gz

如果遇到以下错误提示,

    unable to execute 'gcc': No such file or directory
    error: command 'gcc' failed with exit status 1

可能需要安装如下依赖的软件包,

yum install -y gcc

如果遇到以下错误提示,

    gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory
    error: command 'gcc' failed with exit status 1

可能需要安装如下依赖的软件包,

	
yum install -y redhat-rpm-config

如果遇到以下错误提示,

xattr.c:25:10: fatal error: attr/xattr.h: No such file or directory
     #include <attr/xattr.h>
              ^~~~~~~~~~~~~~
     compilation terminated.
     error: command 'gcc' failed with exit status 1

可能需要安装如下依赖的软件包,

	
yum install -y python36-devel

参阅文档
===================

文档主页
———–
https://pyxattr.readthedocs.io/en/latest/

下载页面
———–
https://pyxattr.k1024.org/downloads/

GitHub
———-
https://github.com/iustin/pyxattr/releases

没有评论

发表回复

FTP & SFTP & FTPS
如何使用Python连接FTP?

1 前言 一个问题,一篇文章,一出故事。 笔者遇到一个需要使用Python连接ftp的需求,于是整理 …

Python
如何安装部署pysmb?

1 基础知识 pysmb是一个实验性的SMB/CIFS库 pysmb用Python编写 pysmb实 …

Python
如何安装部署Anaconda3?

1 基础知识 1.1 Anaconda的版本 – Anaconda Enterprise …