Page 1 of 1

OCSSW Intsallation error

Posted: Tue Jun 27, 2023 9:59 am America/New_York
by dortenzio
Hello

I try to install OCSSW on a ubuntu machine.
Visualization software is well installed.
When I try to run

Code: Select all

./install_ocssw --install_dir $HOME/ocssw_glob --tag V2021.3 --seadas --modisa --seawifs 
I got error:

Traceback (most recent call last):
File "/home/fabrizio/Téléchargements/./install_ocssw", line 26, in <module>
import manifest as mf
File "/home/fabrizio/Téléchargements/manifest.py", line 16, in <module>
import requests
File "/home/fabrizio/.local/lib/python3.10/site-packages/requests/__init__.py", line 43, in <module>
import urllib3
File "/home/fabrizio/.local/lib/python3.10/site-packages/urllib3/__init__.py", line 8, in <module>
from .connectionpool import (
File "/home/fabrizio/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 29, in <module>
from .connection import (
File "/home/fabrizio/.local/lib/python3.10/site-packages/urllib3/connection.py", line 39, in <module>
from .util.ssl_ import (
File "/home/fabrizio/.local/lib/python3.10/site-packages/urllib3/util/__init__.py", line 3, in <module>
from .connection import is_connection_dropped
File "/home/fabrizio/.local/lib/python3.10/site-packages/urllib3/util/connection.py", line 3, in <module>
from .wait import wait_for_read
File "/home/fabrizio/.local/lib/python3.10/site-packages/urllib3/util/wait.py", line 1, in <module>
from .selectors import (
File "/home/fabrizio/.local/lib/python3.10/site-packages/urllib3/util/selectors.py", line 14, in <module>
from collections import namedtuple, Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)

Any help will be really appreciated

Thank you
Fabrizio

Re: OCSSW Intsallation error

Posted: Tue Jun 27, 2023 7:01 pm America/New_York
by OB SeaDAS - xuanyang02
It seems that your python3.10 can't find Mapping. There are some discussions @stackoverflow regarding this issue --
https://stackoverflow.com/questions/71632325/cannot-import-name-mapping-from-collections-on-importing-requests

Re: OCSSW Intsallation error

Posted: Tue Jun 27, 2023 9:03 pm America/New_York
by gnwiii
Most linux distros allow you to install older python versions in order to run software developed before the current version was released. There is also Anaconda Python that has older versions. You can create a Python "environment" for the older version and run install_ocssw and the OCSSW software with the environment that proves and older python.

Re: OCSSW Intsallation error

Posted: Wed Jul 05, 2023 9:42 am America/New_York
by dortenzio
Hello
thank you very much for your answers.
I’m not completely sure to understand what you propose:

@xuanyang02: the link you have indicated me, give not solution, just specific hints for a specific user request (in any case I tried proposed solutions with no success);

@gnwiii: I understand your point, although I don’t find the exact Phtyhon version that should be installed: https://seadas.gsfc.nasa.gov/downloads/ indicates only "Python 3.6 or later » is required.
Also, I’m not really expert in python, and If a tuto to create a Python « environment » should be really appreciated

Again, thank you very much for your help
Ciao
Fabrizio

Re: OCSSW Intsallation error

Posted: Wed Jul 05, 2023 11:50 am America/New_York
by OB SeaDAS - xuanyang02
Please ask your system admin to help you install python 3.9 and set your python environment to use python 3.9.

I am using python 3.10 on my mac and it works fine. I guess python 3.10 has issues on linux

Re: OCSSW Intsallation error

Posted: Wed Jul 05, 2023 12:50 pm America/New_York
by gnwiii
The OCSSW software should work with just a base Python installation. Some distributions include base packages for older python versions. After installion an older python version (say 3.8) you should have '/usr/bin/python3.8'.

The OCSSW programs look for python3 in the directories listed in the "PATH" variable. I work around this by creating and verifying a symbolic link as follows:

Code: Select all

$ source $OCSSWROOT/OCSSW_bash.env
$ type python3
/usr/bin/python3
$ cd $OCSSWROOT/binhttps://www.anaconda.com[
$ ln -s /usr/bin/python3.8 python3
$ hash -r
$ type python3
[$OCSSWROOT]/bin/python3
If you plan to use Python scripts together with the OCSSW programs, you may find it better to use Anaconda Python: https://www.anaconda.com. There you can choose between a full-featured Python system or the "miniconda" system, which may be more appropriate for use with the OCSSW software.

Re: OCSSW Intsallation error

Posted: Sat Aug 12, 2023 5:55 am America/New_York
by dortenzio
Hi

sorry for the delayed answer, I experienced some health problems in the last time, keeping me far from coding.
Anyway, as suggested by you, a Phython old version, linked with a symbolic link to the SEADAS config, did the job.
OCSSW run now , without problem.

thank you very much for your help
ciao

Re: OCSSW Intsallation error

Posted: Sun Aug 13, 2023 9:12 pm America/New_York
by gnwiii
Sorry you had health problems. Thanks for the follow-up and hope your OCSSW work goes smoothly.