1、安装工具
https://github.com/andreafrancia/trash-cli
unzip trash-cli-0.24.5.26.zip
cd trash-cli-0.24.5.26
python3 setup.py install
Traceback (most recent call last):
File "setup.py", line 4, in <module>
setup()
File "/usr/lib/python3.6/site-packages/setuptools/__init__.py", line 128, in setup
_install_setup_requires(attrs)
File "/usr/lib/python3.6/site-packages/setuptools/__init__.py", line 121, in _install_setup_requires
dist.parse_config_files(ignore_option_errors=True)
File "/usr/lib/python3.6/site-packages/setuptools/dist.py", line 495, in parse_config_files
ignore_option_errors=ignore_option_errors)
File "/usr/lib/python3.6/site-packages/setuptools/config.py", line 107, in parse_configuration
options.parse()
File "/usr/lib/python3.6/site-packages/setuptools/config.py", line 395, in parse
self.section_prefix, section_name))
distutils.errors.DistutilsOptionError: Unsupported distribution option section: [options.data_files]
如果报以上错误
python -m pip install --upgrade setuptools #更新一下软件包
python3 setup.py install #如果执行的时候提示超时 需要pip install xxx 模块进行下载。
如果报错:
psutil/_psutil_common.c:9:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
psutil could not be installed from sources. Perhaps Python header files are not installed. Try running:
sudo yum install gcc python3-devel
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ti38llzm/psutil/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-o3efhvq5-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-ti38llzm/psutil/
需要执行:yum install python3-devel
安装完毕即可。
命令概览:
trash-put 将文件或目录移入回收站
trash-empty 清空回收站
trash-list 列出回收站中的文件
restore-trash 还原回收站中的文件
trash-rm 删除回首站中的单个文件
标签:__,功能,setuptools,setup,py,install,linux,trash,回收站
From: https://www.cnblogs.com/zops/p/18398037