No module named requests

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
seagrant
Posts: 5
Joined: Thu May 26, 2022 2:33 pm America/New_York

No module named requests

by seagrant » Thu May 26, 2022 3:05 pm America/New_York

Hello everyone,

I recently downloaded SeaDas, and I am trying to install data processors (SeaDAS-OCSSW -> Install/Update OC Processors). However, I am receiving an error "no module named requests". I've been struggling to figure out why this is happening for a few days because I do have python requests downloaded. Any advice would be much appreciated.

Tags:

OB SeaDAS - xuanyang02
Subject Matter Expert
Subject Matter Expert
Posts: 310
Joined: Tue Feb 09, 2021 5:42 pm America/New_York
Answers: 1

Re: No module named requests

by OB SeaDAS - xuanyang02 » Thu May 26, 2022 3:40 pm America/New_York

Can you do SeaDAS-OCSSW -> SeaDAS/System Info and post the results here?

It probably has something to do with your environment.
Last edited by OB SeaDAS - xuanyang02 on Wed Jun 01, 2022 1:12 pm America/New_York, edited 1 time in total.

seagrant
Posts: 5
Joined: Thu May 26, 2022 2:33 pm America/New_York

Re: No module named requests

by seagrant » Thu May 26, 2022 4:16 pm America/New_York

-----------------------------------------------------------
Main Application Platform:
-----------------------------------------------------------
Application Version: SeaDAS 8.2.0
SNAP Engine Version: 8.0.9* (SeaDAS Platform modified)
SNAP Desktop Version: 8.0.9* (SeaDAS Platform modified)
SNAP Engine Build Date: 202203151509
SNAP Desktop Build Date: 202203151517
Installation Directory: /Users/Dreese/Applications/SeaDas
Data Directory: /Users/Dreese/.seadas8
Configuration: /Users/Dreese/Applications/SeaDas/etc/snap.properties
VM Configuration: /Users/Dreese/Applications/SeaDas/etc/snap.conf
VM Configuration (gpt): /Users/Dreese/Applications/SeaDas/bin/gpt.vmoptions
VM Configuration (pconvert): /Users/Dreese/Applications/SeaDas/bin/pconvert.vmoptions
Runtime Configuration: /Users/Dreese/.seadas8/etc/snap.properties
Runtime Configuration (SeaDAS Toolbox): /Users/Dreese/.seadas8/etc/seadas.properties
JRE: Java(TM) SE Runtime Environment 1.8.0_201-b09
JVM: Java HotSpot(TM) 64-Bit Server VM by Oracle Corporation
Memory: 3641 MiB
OCSSWROOT (Java Env): null
Python3 Directory: /opt/anaconda3/bin/python3


-----------------------------------------------------------
SeaDAS Toolbox:
-----------------------------------------------------------
SeaDAS Toolbox Version: 1.2.0
SeaDAS Toolbox Build Date: 202203211503
Configuration: /Users/Dreese/.seadas8/etc/seadas.properties
OCSSW Root Directory: /Users/Dreese/Applications/SeaDas/ocssw
OCSSW Log Directory: /
OCSSW Location: local
Environment {$OCSSWROOT} (external): null


-----------------------------------------------------------
NASA Science Processing (OCSSW):
-----------------------------------------------------------
Environment {$OCSSWROOT}: /Users/Dreese/Applications/SeaDas/ocssw
Environment {$OCDATAROOT}: /Users/Dreese/Applications/SeaDas/ocssw/share
l2gen version: msl12 9.5.1-V2022.0 (Jan 11 2022 14:32:35)
l2bin version: 7.0.3
l3bin version: 5.13
l3mapgen version: l3mapgen 2.3.0-V2022.0 (Jan 11 2022 14:33:38)
Installed Missions: ['avhrr', 'czcs', 'goci', 'hawkeye', 'hico', 'meris', 'aqua', 'terra', 'mos', 'ocm1', 'ocm2', 'octs', 'oli', 'osmi', 'seawifs', 'sgli', 'viirsn', 'viirsj1', 'viirsdem']


-----------------------------------------------------------
General System and Software:
-----------------------------------------------------------
Operating system: MacOS 10.16
Java version: 15
Python3 version: 3.8.8
Python3 Path: /opt/anaconda3/bin/python3
Env: ASAP_PARMS=/Users/Dreese/Applications/SeaDas/ocssw/share/common/nav
CC=gcc
COMMAND_MODE=unix2003
CONDA_DEFAULT_ENV=base
CONDA_EXE=/opt/anaconda3/bin/conda
CONDA_PREFIX=/opt/anaconda3
CONDA_PROMPT_MODIFIER=(base)
CONDA_PYTHON_EXE=/opt/anaconda3/bin/python
CONDA_SHLVL=1
CXX=g++
ELEMENTS=/Users/Dreese/Applications/SeaDas/ocssw/var/seawifs
EOS_LIB_PREFIX=macintel64
FC=gfortran
GCC_TUNE=
HDFEOS_LIB=/Users/Dreese/Applications/SeaDas/ocssw/opt/EOS/lib/macintel64
HOME=/Users/Dreese
HRPT_STATION_IDENTIFICATION_FILE=/Users/Dreese/Applications/SeaDas/ocssw/share/seawifs/station/station_id.dat
J2D_PIXMAPS=shared
JAVA_MAIN_CLASS_20291=org.netbeans.Main
L2GEN_ANC=/Users/Dreese/Applications/SeaDas/ocssw/var/anc
LC_CTYPE=UTF-8
LIB3_BIN=/Users/Dreese/Applications/SeaDas/ocssw/opt/bin
LIB3_CHECK=0
LIB3_DIR=/Users/Dreese/Applications/SeaDas/ocssw/opt
LIB3_INC=/Users/Dreese/Applications/SeaDas/ocssw/opt/include
LIB3_LIB=/Users/Dreese/Applications/SeaDas/ocssw/opt/lib
LOGNAME=Dreese
NAVCTL=/Users/Dreese/Applications/SeaDas/ocssw/share/seawifs/nav
NAVQC=/Users/Dreese/Applications/SeaDas/ocssw/share/seawifs/nav
OCDATAROOT=/Users/Dreese/Applications/SeaDas/ocssw/share
OCSSWROOT=/Users/Dreese/Applications/SeaDas/ocssw
OCSSW_ARCH=macosx_intel
OCSSW_BIN=/Users/Dreese/Applications/SeaDas/ocssw/bin
OCSSW_DEBUG=0
OCSSW_SVN=localhost
OCTS_REGISTRATION_TABLES=/Users/Dreese/Applications/SeaDas/ocssw/share/octs/nav
OCVARROOT=/Users/Dreese/Applications/SeaDas/ocssw/var
ORBCTL=/Users/Dreese/Applications/SeaDas/ocssw/share/seawifs/nav
PATH=/Users/Dreese/Applications/SeaDas/ocssw/opt/bin:/Users/Dreese/Applications/SeaDas/ocssw/bin:/opt/anaconda3/bin:/opt/anaconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
PGSINC=/Users/Dreese/Applications/SeaDas/ocssw/opt/EOS/include
PGSLIB=/Users/Dreese/Applications/SeaDas/ocssw/opt/EOS/lib/macintel64
PROJ_LIB=/Users/Dreese/Applications/SeaDas/ocssw/opt/share/proj
PWD=/
SHELL=/bin/zsh
SHLVL=3
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.yD5VuP35mN/Listeners
SWFTBL=/Users/Dreese/Applications/SeaDas/ocssw/share/seawifs/qc
SWTBL=/Users/Dreese/Applications/SeaDas/ocssw/share/seawifs
TMPDIR=/var/folders/9j/q1qgtzms42s8yjb08zsz8y3r0000gn/T/
USER=Dreese
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
_=/usr/bin/env
_CE_CONDA=
_CE_M=
__CFBundleIdentifier=gov.nasa.gsfc.seadas
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0

OB SeaDAS - xuanyang02
Subject Matter Expert
Subject Matter Expert
Posts: 310
Joined: Tue Feb 09, 2021 5:42 pm America/New_York
Answers: 1

Re: No module named requests

by OB SeaDAS - xuanyang02 » Fri May 27, 2022 2:56 pm America/New_York

It seems that your SeaDAS is using /opt/anaconda3/bin/python3, you might need to

Code: Select all

conda install -c anaconda requests
Here is another post discussing requests for anaconda viewtopic.php?t=2198&sid=ea8d28dd2d6e7039161626549686fe33&start=30

seagrant
Posts: 5
Joined: Thu May 26, 2022 2:33 pm America/New_York

Re: No module named requests

by seagrant » Fri May 27, 2022 3:52 pm America/New_York

Thank you. Unfortunately, the following error appears when running that code in the terminal:

RemoveError: 'requests' is a dependency of conda and cannot be removed from
conda's operating environment.

seagrant
Posts: 5
Joined: Thu May 26, 2022 2:33 pm America/New_York

Re: No module named requests

by seagrant » Fri May 27, 2022 4:43 pm America/New_York

I was able to resolve then above error by running conda update --force conda, and I was able to successfully run conda install -c anaconda requests. However, I am still receiving the same "no module named requests" error in SeaDAS.

OB SeaDAS - xuanyang02
Subject Matter Expert
Subject Matter Expert
Posts: 310
Joined: Tue Feb 09, 2021 5:42 pm America/New_York
Answers: 1

Re: No module named requests

by OB SeaDAS - xuanyang02 » Tue May 31, 2022 5:42 pm America/New_York

If you have another copy of python3 in /usr/local/bin/, it might be easier to point SeaDAS to use that copy of python3 by adding this line

export PATH="/usr/local/bin/python3:$PATH"

to your bash file.

If you still want to use /opt/anaconda3/bin/python3, you can refer to this post to set the path, or ask your system administrator for help to set the environment right. viewtopic.php?t=2198&sid=54a11ef9c642de22a38171b607cf9aaf&start=40

Post Reply