본문 바로가기
Python notes/Web Programming

파이썬 크롤러) MAC에서 MySQL과 python3 연동하기 (pip로 MySQL 패키지 설치)

by 성실한 나무 2018. 12. 28.

엄청나게 삽질하고(MySQL사이트 들어가서 라이브러리 다운 받고 난리) 알아낸 명령어:

pip install mysql-connector-python


My-iMac:Downloads MyMy$ pip install mysql-connector-python

Collecting mysql-connector-python

  Downloading https://files.pythonhosted.org/packages/90/3c/40067fa3fc43a7273ab7839444b802ea3bdb69b35523843c8d9ea337ff65/mysql_connector_python-8.0.13-cp37-cp37m-macosx_10_13_x86_64.whl (3.5MB)

    100% |████████████████████████████████| 3.5MB 5.9MB/s 

Collecting protobuf>=3.0.0 (from mysql-connector-python)

  Downloading https://files.pythonhosted.org/packages/18/e7/785830a65d1f1faba7dccfa8314f7afded1db8cc2860218226ba4b3f6150/protobuf-3.6.1-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (1.2MB)

    100% |████████████████████████████████| 1.2MB 10.6MB/s 

Requirement already satisfied: setuptools in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from protobuf>=3.0.0->mysql-connector-python) (39.0.1)

Requirement already satisfied: six>=1.9 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from protobuf>=3.0.0->mysql-connector-python) (1.12.0)

Installing collected packages: protobuf, mysql-connector-python

Successfully installed mysql-connector-python-8.0.13 protobuf-3.6.1



※ 하기 링크를 참고 했음

https://dev.mysql.com/doc/dev/connector-python/8.0/installation.html


>>> import mysqlx

>>> 


잘 되었다 !


여기서 튜토리얼로 연습해봐야지..

https://dev.mysql.com/doc/dev/connector-python/8.0/tutorials/getting_started.html

댓글