티스토리 뷰
[ 상황 ]
mysql-python 을 설치하려고 하는데 자꾸 에러가 난다.
sh-3.2# pip install mysql-python
Collecting mysql-python
Using cached MySQL-python-1.2.5.zip
Complete output from command python setup.py egg_info:
sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/tmp/pip-build-fEo3YN/mysql-python/setup.py", line 17, in <module>
metadata, options = get_config()
File "setup_posix.py", line 43, in get_config
libs = mysql_config("libs_r")
File "setup_posix.py", line 25, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-fEo3YN/mysql-python/
[ 해결 방법 ]
mysql을 설치해줬다.
$ brew install mysql
==> Downloading https://homebrew.bintray.com/bottles/mysql-5.7.18_1.sierra.bottl
######################################################################## 100.0%
==> Pouring mysql-5.7.18_1.sierra.bottle.tar.gz
==> Using the sandbox
==> /usr/local/Cellar/mysql/5.7.18_1/bin/mysqld --initialize-insecure --user=urb
==> Caveats
We've installed your MySQL database without a root password. To secure it run:
mysql_secure_installation
MySQL is configured to only allow connections from localhost by default
To connect run:
mysql -uroot
To have launchd start mysql now and restart at login:
brew services start mysql
Or, if you don't want/need a background service you can just run:
mysql.server start
==> Summary
🍺 /usr/local/Cellar/mysql/5.7.18_1: 321 files, 232.9MB
$
그리고 다시 설치해보니 된다.
sh-3.2# pip install mysql-python
Collecting mysql-python
Using cached MySQL-python-1.2.5.zip
Building wheels for collected packages: mysql-python
Running setup.py bdist_wheel for mysql-python ... done
Stored in directory: /var/root/Library/Caches/pip/wheels/38/a3/89/ec87e092cfb38450fc91a62562055231deb0049a029054dc62
Successfully built mysql-python
Installing collected packages: mysql-python
Successfully installed mysql-python-1.2.5
sh-3.2#
'개발' 카테고리의 다른 글
디지털오션 워드프레스에 HTTPS를 위한 SSL 인증서 설치하고 자동갱신 (auto renew)하기 (0) | 2020.08.25 |
---|---|
아이프레임 내부 form에서 submit후 부모창에서 상태 변화주기 (0) | 2017.09.13 |
No module named google.appengine.api 해결 방법 및 bash_profile 생성하기 (0) | 2017.06.03 |
Homebrew, python2.7 파이썬 설치하기 (0) | 2017.06.03 |
PIP(파이썬 패키지 관리 시스템), FLASK 설치하기 (0) | 2017.06.03 |