• Create
    • Ask a question
    • Create an article
    • Topics
    • Questions
    • Articles
    • Users
    • Badges
  • Sign in
  • Home /
avatar image
0

GDAL installation

pythoninit-scriptpackage installation
Question by ykb5t · Mar 30, 2018 at 04:14 AM ·

I'm trying to install GDAL for Python 3 (https://pypi.python.org/pypi/GDAL)

I've added libraries to the init script, however it's still throwing an error when I'm attaching GDAL library to my cluster. Any ideas?

sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable

sudo apt-get install gdal-bin python-gdal python3-gdal

Add comment
Comment
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Answers

Sort

  • Votes
  • Created
  • Oldest
avatar image
1

Answer by Billy Lowslan · Oct 05, 2018 at 06:58 AM

I often have problems installing GDAL for Python. Here my friend helped me decide, I will clarify how to do it. If you had problems with buy app install then I could tell you what to do, I have experience in resolving this issue.

Comment
Add comment · Share
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by vincent.jolivet@databricks.com · Sep 27, 2018 at 11:46 AM

Answer for Python 3 : Run the following and restart your cluster

dbutils.fs.put("/databricks/init/gdal-initpython3.sh",""" #!/bin/bash export GDAL_VERSION=2.1.3+dfsg-1~xenial2 add-apt-repository ppa:ubuntugis/ppa && apt-get update apt-get install -y gdal-bin=$GDAL_VERSION python-gdal=$GDAL_VERSION libgdal-dev=$GDAL_VERSION libgdal-java=$GDAL_VERSION libopencv-dev python-opencv apt install gdal-bin python3-gdal """, True)

Comment
Add comment · Show 1 · Share
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image emissary · Oct 02, 2018 at 04:54 PM 0
Share

Still does not work for me. Nothing changed after putting your init script and restart. Anything else should be done except your init script? BTW: I am working on Azure databricks.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

18 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How can I Install PyPi Package from a private repository? 1 Answer

Installing cx_oracle 0 Answers

Are packages installed in databricks virtualenv shared across users when using a serverless pool? 0 Answers

Why are Python custom UDFs (registerFunction) showing Arrays with java.lang.Object references? 1 Answer

While running a application in Apache Spark, gave WARN message 0 Answers

  • Product
    • Databricks Cloud
    • FAQ
  • Spark
    • About Spark
    • Developer Resources
    • Community + Events
  • Services
    • Certification
    • Spark Support
    • Spark Training
  • Company
    • About Us
    • Team
    • News
    • Contact
  • Careers
  • Blog

Databricks Inc.
160 Spear Street, 13th Floor
San Francisco, CA 94105

info@databricks.com
1-866-330-0121

  • Twitter
  • LinkedIn
  • Facebook
  • Facebook

© Databricks 2015. All rights reserved. Apache Spark and the Apache Spark Logo are trademarks of the Apache Software Foundation.

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Explore
  • Topics
  • Questions
  • Articles
  • Users
  • Badges