0
%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?

0

1 Answer 1

2

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 ?

2
  • The ! does make pip3 work. Unfortunately it still does not enable my install, as there must be a more fundamental barrier than just using pip3 vs pip. Thanks!
    – Johnny V
    Commented Oct 4, 2019 at 10:01
  • "!pip install spotify confidence" installs the spotify package, then the confidence package. Unfortunately this is not the confidence package that Spotify build, but another package that is unrelated.
    – Johnny V
    Commented Oct 4, 2019 at 10:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.