V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
yuyang4271
V2EX  ›  程序员

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

  •  
  •   yuyang4271 · May 28, 2019 · 4299 views
    This topic created in 2533 days ago, the information mentioned may be changed or developed.

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

    14 replies    2019-05-28 11:38:21 +08:00
    ryonanamizu
        1
    ryonanamizu  
       May 28, 2019
    update 了没?
    yuyang4271
        2
    yuyang4271  
    OP
       May 28, 2019
    @ryonanamizu 嗯 update 过了
    aquariumm
        3
    aquariumm  
       May 28, 2019 via Android   ❤️ 1
    输的命令是什么?报错具体是什么?
    你这和问“我手机没信号怎么办”一样
    uuspider
        4
    uuspider  
       May 28, 2019 via iPhone
    pip 呢?
    yuyang4271
        5
    yuyang4271  
    OP
       May 28, 2019
    @aquariumm 输入的命令是
    sudo apt-get install python3-pyttsx3
    报错是:无法定位软件包:pyttsx3
    yuyang4271
        6
    yuyang4271  
    OP
       May 28, 2019
    @uuspider pip 也试了,报错是网络不可达
    aquariumm
        7
    aquariumm  
       May 28, 2019 via Android
    @yuyang4271 如果是这样,那你是不是中间加了个空格,apt 装 python 包应该是 python3-xxx,报错无法定位 python3-xxx
    再看看网络问题,curl 一下仓库试试
    SuperMild
        8
    SuperMild  
       May 28, 2019
    apt search 能找到这个包吗?
    Skye347
        9
    Skye347  
       May 28, 2019 via Android
    树莓派的 arm 的源和包和普通的 x86 不一样的,可能会缺很多
    Taeye9n
        10
    Taeye9n  
       May 28, 2019
    apt search 搜一下源里有没有,pip search 是有的
    amazingrise
        11
    amazingrise  
       May 28, 2019 via Android
    树莓派的很多包后面都是-dev 结尾的,你搜一下包名
    yuyang4271
        12
    yuyang4271  
    OP
       May 28, 2019
    @aquariumm 好的 我试试,谢谢你
    yuyang4271
        13
    yuyang4271  
    OP
       May 28, 2019
    @amazingrise 好的 谢谢你,我试一下
    princelai
        14
    princelai  
       May 28, 2019
    以下在 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 里有,请检查网络或使用的源
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2479 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 44ms · UTC 07:15 · PVG 15:15 · LAX 00:15 · JFK 03:15
    ♥ Do have faith in what you're doing.