This is a library order problem. For instance Pandas needs a specific version of numpy during the Pip install phase.
#! python3
#r: pandas, openpyxl, psycopg2
import rhinoscriptsyntax as rs
import scriptcontext as sc
import System
import System.Collections.Generic
import Rhino
import locale
locale.setlocale(locale.LC_ALL, 'en_US')
import openpyxl
import psycopg2
import pandas as pd
print(pd.__version__)
By removing the other libraries first and getting pandas to work properly was the first step. Then the other two libraries can be added to install after pandas
I have been seeing this lately where PIP installs multiple libraries and there are specific internal dependencies that can conflict with other libraries. I think both Pandas and Openyxl can be a specific about numpy and scipy libraries they need.
I hope this helps.