POLYMER installation error

Post Reply
Kzy
Posts: 4
Joined: Mon Dec 11, 2023 10:38 am
company / institution: SYSU
Location: Guangzhou, China

POLYMER installation error

Post 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.
Last edited by Kzy on Thu Dec 14, 2023 3:53 am, edited 1 time in total.
Kzy
Posts: 4
Joined: Mon Dec 11, 2023 10:38 am
company / institution: SYSU
Location: Guangzhou, China

Re: POLYMER installation error

Post 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.
sakvaka_env
Posts: 25
Joined: Mon Mar 07, 2022 9:54 am
company / institution: Finnish Environment Institute
Location: Helsinki, Finland

Re: POLYMER installation error

Post 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.
Kzy
Posts: 4
Joined: Mon Dec 11, 2023 10:38 am
company / institution: SYSU
Location: Guangzhou, China

Re: POLYMER installation error

Post 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.
User avatar
fsteinmetz
Site Admin
Posts: 306
Joined: Fri Sep 07, 2018 1:34 pm
company / institution: Hygeos
Location: Lille, France
Contact:

Re: POLYMER installation error

Post 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.
Post Reply