I created a custom plugin to execute python in wordpress as seen here:

Running a python script within wordpress

It works well mostly, except certain packages in the python script yields ImportError such as SQLAlchemy. I'm able to import it outside of wordpress in the command line, so it's definitely installed.

I'm trying to write a dataframe created in pandas into a mysql database. Before, I used SQLalchemy to create_engine, is there a wordpress friendly way to do this?

Thanks in advance.

edit: pymysql library doesn't seem to work also.

edit: one way to do it is iteratively using pandas iterrows but it's kinda lame.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.