首页 > 解决方案 > 如何在谷歌 colab 中使用 pip3?

问题描述

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

导致此错误:

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

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

标签: pythonpipjupytergoogle-colaboratory

解决方案


您必须改为使用!才能%运行 bash 命令

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

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

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

!pip install spotify confidence?


推荐阅读