【问题标题】:How can I use pip3 with google colab?如何在谷歌 colab 中使用 pip3?
【发布时间】:2020-02-02 14:24:02
【问题描述】:
%pip3 install --index-url=https://pypi.spotify.net/spotify/production confidence

导致此错误:

UsageError: Line magic function `%pip3` not found.

如何在 google colab 上安装带有 pip3 的包?

【问题讨论】:

    标签: python pip jupyter google-colaboratory


    【解决方案1】:

    您必须使用 ! 而不是 % 才能运行 bash 命令

    !pip3 install --index-url=https://pypi.spotify.net/spotify/production confidence

    但是您可以简单地使用pip 而不是pip3

    编辑:如您所见,该 url 返回一个 ConnectTimeoutError,因为它显然已损坏。也许你只想简单地运行

    !pip install spotify confidence?

    【讨论】:

    • 该!确实使 pip3 工作。不幸的是,它仍然无法启用我的安装,因为必须存在比仅使用 pip3 与 pip 更基本的障碍。谢谢!
    • "!pip install spotify confidence" 安装 spotify 包,然后是 confidence 包。不幸的是,这不是 Spotify 构建的信心包,而是另一个不相关的包。
    猜你喜欢
    • 2019-03-02
    • 2020-01-27
    • 2020-10-04
    • 2019-04-27
    • 1970-01-01
    • 2023-01-19
    • 2021-01-26
    • 2020-04-30
    • 2019-11-27
    相关资源
    最近更新 更多