I am running the following script from a Webhosting service (Apache), where pandas and all it's dependencies are in the same folder. Importing Numpy works fine, importing pandas however throws an exception. I tried it with different version of pandas too (0.24.0, 0.24.2 etc.)
#!/usr/bin/env python3
import sys
import traceback
print('Content-type: text/html\r\n')
print('\r\n')
print('Hello, World!')
print (sys.version)
print('\r\n')
sys.path.append(".")
try:
import pandas as pd
print(pd.__version__)
except:
traceback.print_exc()
print(sys.exc_info())
Browser Output:
Hello, World! 3.5.2 (default, Oct 8 2019, 13:06:37) [GCC 5.4.0 20160609] (, PermissionError(13, 'Permission denied'), )
The reason I am using python on a server is that I already have a python script that depends on pandas and would like to reuse it in a php/web project without the need to rent a whole server. Any clue on how to fix it or how to gather more information on why it fails would be appreciated