I have installed landsat-util and tried to simply run the example code they provide in the documentation:

landsat download LC81050682014217LGN00

Which results in a syntax error:

  File "<tmp 1>", line 3
landsat download LC81050682014217LGN00
SyntaxError: invalid syntax

I'm not sure what I'm missing here? I have also tried:

landsat.download [ID] 

With the same results. I'm using Python 2.7 and Linux Mint 18 Sarah.

  • 2
    Run landsat download [ID] from a command prompt, not a python prompt (once landsat-util is installed correctly, and the landsat scripts/exes are on your PATH).
    – user2856
    Commented Oct 25, 2017 at 4:59
  • @Luke, i'm fairly new at Python. The second part of your answer 'scripts/exes on path', would you be able to explain that? Does this mean I have to tell command prompt where the package is located? Commented Oct 25, 2017 at 10:20

1 Answer 1


Might be something wrong with your installation - this worked for me:

sudo pip install --no-use-wheel --upgrade landsat-util
  • This got me further than before, and now I'm hitting this error:Complete output from command python setup.py egg_info: CRITICAL:root:Numpy and its headers are required to run setup(). Exiting. I think I solved that issue with github.com/geowurster/gj2ascii/issues/10 Commented Oct 26, 2017 at 11:25
  • 1
    Before you can run the command above, you must do pip install numpy cython because these two packages are needed to build one of landsat-util's dependencies (rasterio). (Related: installing non-wheel Python distributions with sudo is a security risk, it can run any Python code in the distribution's setup script as root.)
    – sgillies
    Commented Oct 26, 2017 at 16:47
  • ImportError: libgeos-3.4.2.so:cannot open shared object file: No such file or directory I did sudo apt-get install libgeos-dev and get the same error when running the initial code. Commented Oct 26, 2017 at 17:18
  • I assume you followed the installation procedure and did: sudo apt-get update sudo apt-get install python-pip python-numpy python-scipy libgdal-dev libatlas-base-dev gfortran libfreetype6-dev ?
    – Martinyt
    Commented Oct 27, 2017 at 9:48

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.