Linux安装autosub踩坑“ERROR: Package 'cachetools' requires a different Python: 2.7.13 not in '~= 3.5'
2020-04-05 12:16
2471 查看
今天心血来潮,想在Debian上安装
autosub,项目地址:https://github.com/agermanidis/autosub
这是一个自动语音转文字的软件,基于python编写,以后有机会再介绍用法。
安装
autosub:
pip install autosub
在安装过程中遇到问题,报错:
ERROR: Package 'cachetools' requires a different Python: 2.7.13 not in '~= 3.5'
意思是python版本应该是3.5左右而非2.7.13
这里我疑惑了很久,是因为我英语太差,把它理解成了需要2.7.13而不是3.5
踩坑过程,请勿轻易模仿
输入
pip -V查看当前的python版本,得到:
pip 20.0.2 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)
可见python版本确实过低。我确定已经安装了python3.5,默认路径在
/usr/bin/,请首先确保你已经安装了新版的python
为新版python配置pip:
编辑文件/usr/location/bin/pip,第一行改为#!/usr/bin/python3
如果该版本python未安装pip,执行:
wget https://bootstrap.pypa.io/get-pip.py python3 get-pip.py
再运行autosub安装命令果然没有报错了
但是!经判断,autosub是基于python2的项目,在python3.5下无法运行!
如果你也不幸踩到这个坑,先把已经安装的autosub卸载
正确解法
问题出现的原因是
cachetools包更新至
4.0.0,此版本不支持2.7。我们只需手动安装低版本的
cachetools包
查看
cachetools包历史版本
pip install cachetools==?
出现信息:
Looking in indexes: https://mirrors.aliyun.com/pypi/simple ERROR: Could not find a version that satisfies the requirement cachetools==? (from versions: 0.0.0, 0.1.0, 0.2.0, 0.3.0, 0.3.1, 0.4.0, 0.5.0, 0.5.1, 0.6.0, 0.7.0, 0.7.1, 0.8.0, 0.8.1, 0.8.2, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, 2.0.0, 2.0.1, 2.1.0, 3.0.0, 3.1.0, 3.1.1, 4.0.0) ERROR: No matching distribution found for cachetools==?
尝试安装
3.1.1
pip install cachetools==3.1.1
安装成功后,再运行安装
autosub命令,程序成功安装并正常运行!
更新
受大佬@BingLingGroup指点,得知最新版的autosub支持python3,由于pip源更新慢于作者仓库,所以直接从github获取
运行以下命令执行安装即可
pip3 install git+https://github.com/agermanidis/autosub.git@master
问题最新进展 https://github.com/agermanidis/autosub/issues/171
交流讨论等具体内容请访问我的博客
原文地址:https://boyinthesun.cn/post/error-autosub/
- 点赞
- 收藏
- 分享
- 文章举报
相关文章推荐
- 在Linux下安装python package到指定目录
- linux下python3.5+pip安装
- linux安装python3.5
- linux安装python3.5环境和pip
- Linux 下 pip 升级遇到的问题 python3.5 和安装 python pip
- 【linux】centos6.9通过virtualenv安装python3.5
- win7Python3.5安装Scrapy出现error: Unable to find vcvarsall.bat
- Linux安装python3.5
- python3.5安装pyHook,解决【TypeError: MouseSwitch() missing 8 required positional arguments: 'msg', 'x', 'y', 'data', 'time', 'hwnd', and 'window_name'】这个错误!
- 【一步到位】linuxmint18.3 python3.5安装tensorflow-gpu和anaconda
- 使用yum源自带包安装Ansible失败,Error: Package: ansible-2.6.13-1.el6.noarch (epel) Requires: python-simplejson...
- python3.5解决' error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 '
- Python 安装Setup.py (error package directory 'src atom' does not exist)
- python3.5学习笔记:linux6.4 安装python3 pip setuptools
- [Python3.5]解决安装一些模块时出现“error: Unable to find vcvarsall.bat”的错误
- Linux 安装 Python3.5
- Python3.5 + django1.10.+ 安装mysql失败解决方案:Error loading MySQLdb module: No module named 'MySQLdb'
- python3.5 tensorflow安装简明教程(Linux下Anaconda安装)
- Linux-Ubuntu16.04下Python3.5安装pip3以及scrapy、numpy、itchat
- 【linux】编译安装python3.5交互模式下方向键乱码