In PY02 webinar: 'python setup.py install' fails


#1

Hello, I am setting up the Docker environment for the PY02 webinar. following the instructions in the PY02_ForestBiomass_Sentinel2_tutorial.pdf. When I get to section 6.4 when need to run “python ‘setup.py’ install” it’s giving an error: “[Errno 2] No such file or directory”

this is the log:

* (base) rus@front:~/.snap/snap-python/snappy$ cd /usr/local/snap/bin
(base) rus@front:/usr/local/snap/bin$ ./snappy-conf /home/rus/.anaconda/envs/PY02_agb/bin/python3 /home/rus/.anaconda/envs/PY02_agb/lib/python3.6/site-packages/
Configuring SNAP-Python interface...
Done. The SNAP-Python interface is located in '/home/rus/.anaconda/envs/PY02_agb/lib/python3.6/site-packages/snappy'
When using SNAP from Python, either do: sys.path.append('/home/rus/.anaconda/envs/PY02_agb/lib/python3.6/site-packages')
or copy the 'snappy' module into your Python's 'site-packages' directory.
^C
(base) rus@front:/usr/local/snap/bin$ cd /home/rus/.snap/snap-python/snappy/
(base) rus@front:~/.snap/snap-python/snappy$ ls
jpy-0.10.0.dev1-cp35-cp35m-linux_x86_64.whl
(base) rus@front:~/.snap/snap-python/snappy$ python setup.py install
python: can't open file 'setup.py': [Errno 2] No such file or directory

any suggestion on how to fix?


#2

the workaround\solution is to copy all files from /home/rus/.anaconda/envs/PY02_agb/lib/python3.6/site-packages/snappy/ to /home/rus/.snap/snap-python/snappy/ and run ‘python setup.py install’ again.