[求助] 树莓派用 apt-get 安装 Python 包报错:无法定位软件包,请问怎么解决呢?

2019-05-28 11:00:01 +08:00
 yuyang4271

试过换成国内镜像源,还是不行。

3244 次点击
所在节点    程序员
14 条回复
ryonanamizu
2019-05-28 11:05:20 +08:00
update 了没?
yuyang4271
2019-05-28 11:21:42 +08:00
@ryonanamizu 嗯 update 过了
aquariumm
2019-05-28 11:22:48 +08:00
输的命令是什么?报错具体是什么?
你这和问“我手机没信号怎么办”一样
uuspider
2019-05-28 11:24:47 +08:00
pip 呢?
yuyang4271
2019-05-28 11:25:22 +08:00
@aquariumm 输入的命令是
sudo apt-get install python3-pyttsx3
报错是:无法定位软件包:pyttsx3
yuyang4271
2019-05-28 11:27:37 +08:00
@uuspider pip 也试了,报错是网络不可达
aquariumm
2019-05-28 11:30:31 +08:00
@yuyang4271 如果是这样,那你是不是中间加了个空格,apt 装 python 包应该是 python3-xxx,报错无法定位 python3-xxx
再看看网络问题,curl 一下仓库试试
SuperMild
2019-05-28 11:32:20 +08:00
apt search 能找到这个包吗?
Skye347
2019-05-28 11:32:53 +08:00
树莓派的 arm 的源和包和普通的 x86 不一样的,可能会缺很多
Taeye9n
2019-05-28 11:33:03 +08:00
apt search 搜一下源里有没有,pip search 是有的
amazingrise
2019-05-28 11:35:17 +08:00
树莓派的很多包后面都是-dev 结尾的,你搜一下包名
yuyang4271
2019-05-28 11:37:22 +08:00
@aquariumm 好的 我试试,谢谢你
yuyang4271
2019-05-28 11:38:18 +08:00
@amazingrise 好的 谢谢你,我试一下
princelai
2019-05-28 11:38:21 +08:00
以下在 manjaro 系统
```
$pip search pyttsx
pyttsx (1.1) - pyttsx - cross platform text-to-speech

$pip search pyttsx3
pyttsx3 (2.71) - Text to Speech (TTS) library for Python 2 and 3. Works without internet connection or delay. Supports multiple TTS engines, including Sapi5, nsss, and espeak.

$yay pyttsx
2 aur/python-pyttsx 1.1-2 (+0 0.00%)
cross platform text-to-speech interface
1 aur/python-pyttsx3 2.7-1 (+0 0.00%)
Pyttsx for python3

```

以下在 debian 系统
```
$apt search pyttsx3
Sorting... Done
Full Text Search... Done

$apt search pyttsx
Sorting... Done
Full Text Search... Done
```

debian 里没有这个包,pip 里有,请检查网络或使用的源

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/568293

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX