Problem with Snappy and error

Yes, I did it in here, source of the post

The error on your post was caused when you tried to create a virtual environment with python 3.
You do not need to crate a virtual environment to configure snappy.

Make sure you have the following:

  • python 2 in your system (if you want anaconda, download anaconda 2)
  • SNAP configured with python 2

Once you have the above, then try and configure snappy with the usual way.

This is the results of cygwin,

this results are quite strange.
well, try with python 2 as described on the post above
you might also need to add the snappy path into your system (see here)

SNAP has uninstalled, Anaconda2 is installed, then SNAP is reinstalled and configured with Anaconda2,

in cmd,

./snappy-conf C:\Users\FALAH FAKHRI\Anaconda2\envs\snappy\bin\python

I got this result,

can you use cygwin to do that?
open up cygwin terminal and type:

./snappy-conf C:\Users\FALAH FAKHRI\Anaconda2\bin\python
when you type the above command make sure you are in the right folder (snap/bin)

if this does not work, another alternative might be the following:

Other trial,

The first step for configuring SNAP with python is fine.
FO the second step, you need to find the file snappy-conf. In my case. in linux system this file is located under /home/snap/bin

You can see the snappy-conf on the right. You need to find where this file resides in your system.
You can also do a search on your windows and type the name of the file you are looking for. Windows might identify it

It’s exist within similar folder of yours, but with different extension, *bat

So, should I apply conf as below?

./snappy-conf.bat C:\Users\FALAH FAKHRI\Anaconda2

Or should I add up "snappy-conf.bat " to the path at first?

I applied this, is it correct?

Actually, your python interpreter is not C:\Users\FALAH FAKHRI\Anaconda2. You need the python executable. replace the above with the following: C:\Users\FALAH FAKHRI\Anaconda2\python.exe

I see three options on how to run the snappy-conf file (windows are bit different than linux in terms of files execution).
try the following:

  1. ./snappy-conf.bat C:\Users\FALAH FAKHRI\Anaconda2\python.exe
  2. just type snappy-conf.bat on your terminal
  3. right click on the file -> run as administrator

I think now is installed, but how to check up it?

this step generates the python module snappy. This should be located under .snap/snap-python. make sure you have the folder snappy in there

Yes, it is there, What is the next step?

Now do:

  • cd ‘snappy’
  • type python.exe to start your python interpreter

Now the moment of truth.
from snappy import ProductIO

If this works, you are all set

I love python and I’m doing long-term course with DataCamp, But python doesn’t love me, and snappy as well,

I also tied this,

well, something went work.
Can you try re-configuring snappy as follows

snappy-conf C:your python interpreter as you did before.
This time without the dot and \ in front of snappy

I got this,

maybe there is another instance of python which gets called first when you enter “python” in the shell? QGIS, for example brings its own python and many other programs as well. If one of them is part of your system’s PATH variable (and listed before the Anaconda one) it could be the one who starts when you enter “python”.

What happens if you open python with the full path? C:\Users\FALAH FAKHRI\Anaconda2\python.exe
and try to load snappy then?

i agree with ABraun. try to launch python using the whole path

also try : `snappy-conf.bat C:python interpreter

if its successful, you need to see teh following message in your terminal`

here is teh source: https://senbox.atlassian.net/wiki/spaces/SNAP/pages/50855941/Configure+Python+to+use+the+SNAP-Python+snappy+interface

python.exe doesn’t response, however, python, is responding,