Johnny V
Johnny V

Reputation: 1238

How can I use pip3 with google colab?

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

results in this error:

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

How can I install a package with pip3 on google colab?

Upvotes: 0

Views: 2100

Answers (1)

JohnnyParafango
JohnnyParafango

Reputation: 326

You have to use ! instead % in order to run bash commands

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

However you can simply use pip instead of pip3

Edit: as you see the url returns a ConnectTimeoutError because it is apparently broken. Maybe you want simply run

!pip install spotify confidence ?

Upvotes: 2

Related Questions