Ong K.S
Ong K.S

Reputation: 297

Google Colab Syntax Error: invalid syntax

I found out python library 'haversine', used to calculate distance between 2 geometry coordinates. I put a comment in Google Colab Jupyter Notebook and run 'pip install haversine' like below.

Surprisingly, I got a 'Syntax Error'. I remove the comment and the command run successfully. What is the issue?

enter image description here

Upvotes: 3

Views: 14823

Answers (1)

Divyessh
Divyessh

Reputation: 2721

Well to install any library in google colab you need to put an exclamation mark before statement like following;

!pip install haversine

Upvotes: 16

Related Questions