Python Forum

Full Version: pymysql on macos seirra
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hello, I downloaded pymysql.tar.gz. I am wondering on macos seirra, which directory does it goes in? I try to stick with python3. Anbd also, do I need to do any manual configuration on mysql and/or apache? thanks.
You're better off downloading the wheel:
If you do this, then once downloaded:
  • cd to the directory containing the wheel file
  • using cmndr or other terminal software, type:
    pip install wheelname
Thanks for the reply.
I am not sure I understand what you mean. Anyhow, I wrote a python3 script that uses pymysql but it was running in Linux. Now I want it to be able to run on my Mac as well, I am stuck because I don't have pymysql on the Mac's weberver installation. I google it but ther doesn't seen to have a comprehensive totural abot it. I am not sure on the where the installation directory should be and if there are any configuration I need to edit on the Mac. And also the terminologies on the net confuse me a bit, are python-mysql, python-mysqldb, pymysql all mean the samething?
Does the apple have pip?

You shouldn't have to worry about the destination directory.
when you install pymysql it will be automatically placed in the proper directory.
Thank you for the replay.
Actully, I just realised that pymysql are both /usr/local/lib/python3.6/site-packages/ and /Library/Python/2.7/site-packages/ directories.
However when I do import pymysql, the Mac terninal does n't find it. Is there something with the socket or something like that I need to config?
I'm not familiar with apple, but there is a path associated with python (main directory)
on other OS's. Python knows where the site-packages directory is located.