Install snappy: mixing pythons

Hi…

I followed below link in STEP forum but I could not find my answers.

I am trying to install Snappy but I have some problems.

I have below softwares installed on my computer

  • 64-bit Windows 10 on an Intel 64-bit laptop.
    Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit (Intel)] on win32
  • 64-bit SNAP 8 (all toolboxes)
  • conda 4.9.2

Then I used below video to install snappy that it is same like your tutorial.

https://www.youtube.com/watch?v=14YM1kKdgA8&t=1s

As you can see in this video, in SNAP command-line (look at video in 2:25 seonds), they used this:

*snappy-conf C:\Users\u6523\miniconda3\envs\snap\python.exe C:\Users\u6523\miniconda3\envs\snap\ Lib*

But in my case, I could not find envs in my admin folder (localadmin_marjan). I found it in here:

*snappy-conf C:\ProgramData\Anaconda3\envs\snap\python.exe C:\ProgramData\Anaconda3\envs\snap\Lib*

but when I use it again I got ‘no module named snappy’.

Would you please let me know what I did wrong?

One more point: I feel they is a problem with mixing pythons….3.8.5 or 2.7?!!!
Please look at this image and also anaconda command line in attachment.
Thanks in advance.

anaconda.command.line.txt (6.1 KB)

SNAP snappy will only work using the same python executable that was used for the configuration. On systems shared by multiple users working on different projects it is recommended that each user install Anaconda3 to a private location so a configuration change made by one user won’t affect other users. It appears that you installed Anaconda3 using “admin” privileges. If you are the only user of the system that should not cause problems.

The text in the youtube video is not clear on a small laptop screen and kept stalling (too many people working from home?) for me, but it appears that you have missed the last step, “Configure Python” in the wiki document. There are several other Python modules named “snappy”, so it is usually best to keep SNAP snappy in the original %USERPROFILE%\.snap\snap-python\snappy location and add that location to your python scripts as described in the wiki article.

Python 2.7 is at “end-of-life” but is still needed by sites that have a collection of scripts built using 2.7. If you are just starting you are advised to use a Conda environment with python 3.6 (the most recent version supported in SNAP 8).

Thanks for reply. It seems I installed it. Please have a look here.

I had a ArcGIS on my computer and it had python in it. So, I removed it and tried again based on this tutorial (you tube) and it seems it is OK.
Would you please let me know how can I be sure about snappy installation on my computer?

I’m not sure what was done other than removing QGIS to cause the two import snappy lines to give different results.

QGIS is very useful in combination with SNAP and does not usually conflict with other python installations. We can’t say much about how SNAP snappy will work for you, only try to help when it fails. The important things are a) learning how to describe a problem in a way that is easy for others to reproduce (It is helpful if you cut and paste terminal output as text), and b) learning more about python so that you can troubleshoot on your own. Watch out for 3rd party packages named “snappy” and 3rd party scripts using SNAP snappy but assume python3 (where print is a function).