(Jun-10-2019, 10:14 AM)Gribouillis Wrote:Quote:it looks to be on the path (in console at least)The question is whether it is also on the path when it runs in apache2. What's the result in that case?
Thanks heaps for your help.
problem solved
I had to add the folder to the path in addition and then comment out the print pymysql
import logging logging.basicConfig(filename='example.log',level=logging.DEBUG) import cgitb cgitb.enable import sys sys.path.append("/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages") #The above directory contains the pymysql directory that is used to interact with mysql #raise RuntimeError(sys.path) import pymysql #print(pymysql)