Page 1 of 1

POLYMER installation error

Posted: Wed Dec 13, 2023 4:43 am
by Kzy
I'm trying to run Polymer in Windows 11. As mentioned in the README.md file, I created a new Anaconda environment and installed these packages successfully. And I installed GUN make as well. When I did STEP1.2 "Auxiliary data", I typed make auxdata_all in the prompt, and it showed "incorrect command syntax". Therefore I skipped this step. While I did the make command, it worked well. I wonder whether I have installed Polymer well?

What's more, I run polymer_cli.py in PyCharm. It shows that, "ImportError: cannot import name 'Level1' from 'polymer.main' (D:\Team\AC\polymer-v4.16.1\polymer\main.py)". I don't know what's wrong.

Re: POLYMER installation error

Posted: Wed Dec 13, 2023 6:00 am
by Kzy
I use this command below to solve the ImportError
sys.path.append('D:\Team\AC\polymer-v4.16.1')
from polymer. main import run_atm_corr, Level1, Level2

it helps and ImportError has been solved. When dealing with sentinel data, as the example.py says, I need level1_msi and level2_netcbf function. But I find level1_msi.py only. And I can hardly believe that it's necessary to import these functions one by one. I sincerely hope for guidance.


Finally I give up running Polymer in Windows.

Re: POLYMER installation error

Posted: Thu Dec 14, 2023 6:02 am
by sakvaka_env
Polymer very much assumes UNIX-based environments (such as Linux), as it depends on GNU Make and utilizes commands that are readily available in UNIX-based systems (for example, using 'wget' to download NASA Ancillary files). Also, the Makefile within Polymer invokes UNIX commands, such as 'rm', 'echo', and 'md5sum' that are not available on Windows systems.

Re: POLYMER installation error

Posted: Sat Dec 23, 2023 1:22 pm
by Kzy
I have installed Polymer in WSL successfully. But another error occurs. I use the command ./polymer_cli.py <level 1> <level 2>. It shows that as below:

AssertionError: Error authenticating to NASA EarthData for downloading ancillary data. Please provide authentication through .netrc. See more information on https://support.earthdata.nasa.gov/inde ... l-and-wget

I know that this message reminds me to create a .netrc file. I did it like this web https://urs.earthdata.nasa.gov/document ... l_and_wget.

I don't what's wrong. Is it because my files are stored in the wrong place? I sincerely hope to get your help.

Re: POLYMER installation error

Posted: Thu Jan 18, 2024 2:29 pm
by fsteinmetz
Hello,
Please check latest Polymer release now available on https://github.com/hygeos/polymer, and the readme section 2.2.1 for setting up the .netrc file.