User receives an error running Python script directly from OS: No module named 'pandas'


Diagnostics

Product: DataMigrator
Release: 8207
Primary OS: Linux
Solution Date:

Symptom

ModuleNotFoundError: No module named 'pandas'

Problem

The user receives the error message above while running a Python script directly from the operating system.

Solution

The Python adapter was not used and the operating system was not up to date or required components.

The Python that is bundled with the Reporting Server can be used to run the operating system level Python scripts by adding the following variables to the operating system environment or by just adding them to the edastart script which is accessible from the Console. 

Variables: 

(comment optional) 
# Set for PYTHON scripts used in DM Flows
export PYTHONHOME=/home/webfocus/dm/ibi/srv82/home/etc/python
export PYTHONPATH=$PYTHONHOME/bin:$PYTHONHOME/lib:$PYTHONHOME/include
export ECONFUSER=/home/webfocus/dm/ibi/srv82/dm/user
export PATH=$PYTHONHOME/bin:$ECONFUSER:$PATH

The scripts were calling python3. Either the scripts need to be changed to call python3.6 or a softlink needs to be created and placed in the _edaconf/user director. This will prevent it from being overwritten during an upgrade.

The python3 softlink target will be: _edahome/etc/python/bin/python3.6