INSTALL 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. PREREQUISITIES
  2. ==============
  3. pyModis requires Python, which comes preinstalled on most Unix machines.
  4. You can check to see if you have it installed on a Unix machine by typing Python at a command prompt.
  5. A result like this and you have Python istalled
  6. Python 2.6.6 (r266:84292, Oct 9 2010, 11:40:09)
  7. [GCC 4.4.5] on linux2
  8. Type "help", "copyright", "credits" or "license" for more information.
  9. >>>
  10. The next error however means that there is a problem:
  11. bash: python: command not found
  12. You can download Python from http://www.python.org/download/releases/
  13. It also requires the Python package of GDAL library (commonly named "python-gdal")
  14. INSTALL
  15. ========
  16. Using pip
  17. ^^^^^^^^^^
  18. You can use pip to install pyModis
  19. pip install pyModis
  20. To upgrade version
  21. pip install --upgrade pyModis
  22. To uninstall
  23. pip uninstall pyModis
  24. From source
  25. ^^^^^^^^^^^^
  26. Download the last stable version from Github
  27. Now decompress the archivie
  28. tar -xzf pyModis.tar.gz
  29. Enter inside the new directory
  30. cd pyModis
  31. Install the library with root permission
  32. su
  33. python setup.py install
  34. on Ubuntu
  35. sudo python setup.py install
  36. Now we can try to load the library so
  37. python
  38. Python 2.6.6 (r266:84292, Oct 9 2010, 11:40:09)
  39. [GCC 4.4.5] on linux2
  40. Type "help", "copyright", "credits" or "license" for more information.
  41. >>> import pymodis
  42. with this response it is all ok
  43. >>>
  44. instead with this one, you must check the installation
  45. Traceback (most recent call last):
  46. File "<stdin>", line 1, in <module>
  47. ImportError: No module named pymodis
  48. Windows
  49. ^^^^^^^^^
  50. The most simple way to install pyModis on Windows is to install latest Python 2.7 from http://python.org/download/
  51. Now you have to modify the "Path" environment variable using Powershell running
  52. [Environment]::SetEnvironmentVariable("Path", "$env:Path;C:\Python27\;C:\Python27\Scripts\", "User")
  53. Download and install the last version of Distribute for Windows from http://python-distribute.org/distribute_setup.py
  54. At this point you can install pip using easy_install
  55. easy_install pip
  56. Now install `numpy <http://www.numpy.org>`_ library using *easy_install* because installation from pip is broken (this is required only for version >= 0.7.1)
  57. easy_install numpy
  58. Finally install pyModis using pip
  59. pip install pyModis