반응형
vscode에서
pip install mysqlclient
설치시 에러 해결!
$ pip install mysqlclient
pip install mysqlclient
Collecting mysqlclient
Using cached mysqlclient-2.2.0.tar.gz (89 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [27 lines of output]
/bin/sh: pkg-config: command not found
해결은 공식문서를 보고 했습니다.
사이트의 중간 부분에 해결 방법이 나와 있습니다.
https://pypi.org/project/mysqlclient/
mysqlclient
Python interface to MySQL
pypi.org
macOS(홈브루)
MySQL 및 mysqlclient를 설치합니다.
아래 명령어를 먼저 했는데, 안되서 그 아래에 있는 명령어로 해결했습니다.
# Assume you are activating Python 3 venv
$ brew install mysql pkg-config
$ pip install mysqlclient
MySQL 서버를 설치하지 않으려면 대신 mysql-client를 사용할 수 있습니다.
# Assume you are activating Python 3 venv
$ brew install mysql-client pkg-config
$ export PKG_CONFIG_PATH="/opt/homebrew/opt/mysql-client/lib/pkgconfig"
$ pip install mysqlclient
해결!!!!
이제 django와 mysql을 연동만 하면 됩니다!
반응형
'공부, 자격증 > Vue.js' 카테고리의 다른 글
[Vue3] TypeError: defineConfig is not a function 에러 해결하기 (1) | 2023.10.30 |
---|---|
[Vue.js3] error Component name "Discount" should always be multi-word 에러 해결하기! (0) | 2023.08.05 |
vue init 명령어 입력시 permission denied 간단 해결법! (0) | 2023.07.28 |
'vue-cli-service'은(는) 내부 또는 외부 명령, 실행할 수 있는 프로그램, 또는 배치 파일이 아닙니다. (0) | 2023.06.30 |
npm init @vitejs/app hello-world-vite2 명령어 오류 (0) | 2023.04.07 |