Giter VIP home page Giter VIP logo

Comments (18)

VioletXF avatar VioletXF commented on August 14, 2024 3

저도 같은 에러를 경험했는데, 저의 경우 아래 방법을 통해 설치에 성공했습니다.

brew install zstd
CFLAGS="-I$(brew --prefix)/include" LDFLAGS="-L$(brew --prefix)/lib" pip install mysqlclient==2.0.1

from seminar-2021.

jaylions avatar jaylions commented on August 14, 2024 3

정말 감사합니다 해결됐습니다!

from seminar-2021.

VioletXF avatar VioletXF commented on August 14, 2024 2

찾아보니 mysql이 usr/local/bin에 있어야 하는 것 같은데 저는 opt/homebrew/bin에 설치가 되어 있는데 이 부분을 고쳐야 할 것 같은데 방법을 잘 모르겠습니다

Homebrew 버전의 차이입니다. x86_64버전의 경우 /usr/local/bin에, ARM버전의 경우 /opt/homebrew/bin에 설치됩니다. 설치 경로는 본 문제와 큰 연관이 없습니다.

from seminar-2021.

footprinthere avatar footprinthere commented on August 14, 2024

pip 대신 pip3을 사용해도 같은 오류가 출력되었습니다.

from seminar-2021.

Jhvictor4 avatar Jhvictor4 commented on August 14, 2024

sudo apt-get install libmysqlclient-dev

치시면 해결 될거에요. mysql_config이 다른 패키지에 있어 발생하는 이슈입니다

from seminar-2021.

jaylions avatar jaylions commented on August 14, 2024

혹시 맥에서는 어떻게 해결해야 하나요?

from seminar-2021.

Jhvictor4 avatar Jhvictor4 commented on August 14, 2024

@jaylions 똑같은 에러인가요/? https://elfinlas.github.io/2019/01/23/pip-mysql-error/ 이거 참고해보시겠어요??

from seminar-2021.

jaylions avatar jaylions commented on August 14, 2024

감사합니다 확인해보겠습니다!

from seminar-2021.

footprinthere avatar footprinthere commented on August 14, 2024

말씀해주신 대로 sudo apt-get install libmysqlclient-dev를 실행한 후 다시 mysqlclient 설치를 시도했는데 이번에는 이런 에러가 나왔습니다.

image

그래서 여기에 나와 있는 대로 python-dev 파일을 설치해보았는데도 여전히 같은 에러가 나옵니다.

from seminar-2021.

footprinthere avatar footprinthere commented on August 14, 2024

sudo apt-get install gcc를 입력해 gcc를 설치했더니 해결되었습니다.

도움 주셔서 감사합니다!!

from seminar-2021.

Jhvictor4 avatar Jhvictor4 commented on August 14, 2024

넵 ㅎㅎ 에러 로그를 보면서 잘 쫓아가 주셨네요 :)

from seminar-2021.

jaylions avatar jaylions commented on August 14, 2024

보내주신 링크에 있는대로 했는데도 해결이 안됩니다 ㅠㅠ

from seminar-2021.

jaylions avatar jaylions commented on August 14, 2024

스크린샷 2021-08-30 오전 12 30 54

from seminar-2021.

jaylions avatar jaylions commented on August 14, 2024

mysql의 설치 위치가 문제인 것 같은데 해결이 잘 되지 않습니다

from seminar-2021.

VioletXF avatar VioletXF commented on August 14, 2024

전체 에러 로그를 올려주실 수 있나요?

from seminar-2021.

jaylions avatar jaylions commented on August 14, 2024

ERROR: Command errored out with exit status 1:
command: /Users/gubukson/waffle-rookies-19.5-backend-0/assignment0/venv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/yh/hgff3rm12310wgk60ntsb0hw0000gn/T/pip-install-z10zosmx/mysqlclient_246670fdb7744a52a8999b06e7350f4c/setup.py'"'"'; file='"'"'/private/var/folders/yh/hgff3rm12310wgk60ntsb0hw0000gn/T/pip-install-z10zosmx/mysqlclient_246670fdb7744a52a8999b06e7350f4c/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/yh/hgff3rm12310wgk60ntsb0hw0000gn/T/pip-wheel-iz8xzdr2
cwd: /private/var/folders/yh/hgff3rm12310wgk60ntsb0hw0000gn/T/pip-install-z10zosmx/mysqlclient_246670fdb7744a52a8999b06e7350f4c/
Complete output (29 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-11-universal2-3.8
creating build/lib.macosx-11-universal2-3.8/MySQLdb
copying MySQLdb/init.py -> build/lib.macosx-11-universal2-3.8/MySQLdb
copying MySQLdb/exceptions.py -> build/lib.macosx-11-universal2-3.8/MySQLdb
copying MySQLdb/connections.py -> build/lib.macosx-11-universal2-3.8/MySQLdb
copying MySQLdb/converters.py -> build/lib.macosx-11-universal2-3.8/MySQLdb
copying MySQLdb/cursors.py -> build/lib.macosx-11-universal2-3.8/MySQLdb
copying MySQLdb/release.py -> build/lib.macosx-11-universal2-3.8/MySQLdb
copying MySQLdb/times.py -> build/lib.macosx-11-universal2-3.8/MySQLdb
creating build/lib.macosx-11-universal2-3.8/MySQLdb/constants
copying MySQLdb/constants/init.py -> build/lib.macosx-11-universal2-3.8/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-11-universal2-3.8/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.macosx-11-universal2-3.8/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.macosx-11-universal2-3.8/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-11-universal2-3.8/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.macosx-11-universal2-3.8/MySQLdb/constants
running build_ext
building 'MySQLdb.mysql' extension
creating build/temp.macosx-11-universal2-3.8
creating build/temp.macosx-11-universal2-3.8/MySQLdb
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -Dversion_info=(2,0,1,'final',0) -D__version
=2.0.1 -I/opt/homebrew/Cellar/mysql/8.0.26/include/mysql -I/Users/gubukson/waffle-rookies-19.5-backend-0/assignment0/venv/include -I/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c MySQLdb/_mysql.c -o build/temp.macosx-11-universal2-3.8/MySQLdb/_mysql.o
gcc -bundle -undefined dynamic_lookup -arch arm64 -arch x86_64 -g build/temp.macosx-11-universal2-3.8/MySQLdb/_mysql.o -L/opt/homebrew/Cellar/mysql/8.0.26/lib -lmysqlclient -lzstd -lresolv -o build/lib.macosx-11-universal2-3.8/MySQLdb/_mysql.cpython-38-darwin.so
ld: library not found for -lzstd
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'gcc' failed with exit status 1

ERROR: Failed building wheel for mysqlclient
Running setup.py clean for mysqlclient
Failed to build mysqlclient
Installing collected packages: mysqlclient
Running setup.py install for mysqlclient ... error
ERROR: Command errored out with exit status 1:
command: /Users/gubukson/waffle-rookies-19.5-backend-0/assignment0/venv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/yh/hgff3rm12310wgk60ntsb0hw0000gn/T/pip-install-z10zosmx/mysqlclient_246670fdb7744a52a8999b06e7350f4c/setup.py'"'"'; file='"'"'/private/var/folders/yh/hgff3rm12310wgk60ntsb0hw0000gn/T/pip-install-z10zosmx/mysqlclient_246670fdb7744a52a8999b06e7350f4c/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/yh/hgff3rm12310wgk60ntsb0hw0000gn/T/pip-record-a5sv50xr/install-record.txt --single-version-externally-managed --compile --install-headers /Users/gubukson/waffle-rookies-19.5-backend-0/assignment0/venv/include/site/python3.8/mysqlclient
cwd: /private/var/folders/yh/hgff3rm12310wgk60ntsb0hw0000gn/T/pip-install-z10zosmx/mysqlclient_246670fdb7744a52a8999b06e7350f4c/
Complete output (29 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-11-universal2-3.8
creating build/lib.macosx-11-universal2-3.8/MySQLdb
copying MySQLdb/init.py -> build/lib.macosx-11-universal2-3.8/MySQLdb
copying MySQLdb/exceptions.py -> build/lib.macosx-11-universal2-3.8/MySQLdb
copying MySQLdb/connections.py -> build/lib.macosx-11-universal2-3.8/MySQLdb
copying MySQLdb/converters.py -> build/lib.macosx-11-universal2-3.8/MySQLdb
copying MySQLdb/cursors.py -> build/lib.macosx-11-universal2-3.8/MySQLdb
copying MySQLdb/release.py -> build/lib.macosx-11-universal2-3.8/MySQLdb
copying MySQLdb/times.py -> build/lib.macosx-11-universal2-3.8/MySQLdb
creating build/lib.macosx-11-universal2-3.8/MySQLdb/constants
copying MySQLdb/constants/init.py -> build/lib.macosx-11-universal2-3.8/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-11-universal2-3.8/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.macosx-11-universal2-3.8/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.macosx-11-universal2-3.8/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-11-universal2-3.8/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.macosx-11-universal2-3.8/MySQLdb/constants
running build_ext
building 'MySQLdb.mysql' extension
creating build/temp.macosx-11-universal2-3.8
creating build/temp.macosx-11-universal2-3.8/MySQLdb
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -Dversion_info=(2,0,1,'final',0) -D__version
=2.0.1 -I/opt/homebrew/Cellar/mysql/8.0.26/include/mysql -I/Users/gubukson/waffle-rookies-19.5-backend-0/assignment0/venv/include -I/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c MySQLdb/_mysql.c -o build/temp.macosx-11-universal2-3.8/MySQLdb/_mysql.o
gcc -bundle -undefined dynamic_lookup -arch arm64 -arch x86_64 -g build/temp.macosx-11-universal2-3.8/MySQLdb/_mysql.o -L/opt/homebrew/Cellar/mysql/8.0.26/lib -lmysqlclient -lzstd -lresolv -o build/lib.macosx-11-universal2-3.8/MySQLdb/_mysql.cpython-38-darwin.so
ld: library not found for -lzstd
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/gubukson/waffle-rookies-19.5-backend-0/assignment0/venv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/yh/hgff3rm12310wgk60ntsb0hw0000gn/T/pip-install-z10zosmx/mysqlclient_246670fdb7744a52a8999b06e7350f4c/setup.py'"'"'; file='"'"'/private/var/folders/yh/hgff3rm12310wgk60ntsb0hw0000gn/T/pip-install-z10zosmx/mysqlclient_246670fdb7744a52a8999b06e7350f4c/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/yh/hgff3rm12310wgk60ntsb0hw0000gn/T/pip-record-a5sv50xr/install-record.txt --single-version-externally-managed --compile --install-headers /Users/gubukson/waffle-rookies-19.5-backend-0/assignment0/venv/include/site/python3.8/mysqlclient Check the logs for full command output.

from seminar-2021.

jaylions avatar jaylions commented on August 14, 2024

찾아보니 mysql이 usr/local/bin에 있어야 하는 것 같은데 저는 opt/homebrew/bin에 설치가 되어 있는데 이 부분을 고쳐야 할 것 같은데 방법을 잘 모르겠습니다

from seminar-2021.

Jhvictor4 avatar Jhvictor4 commented on August 14, 2024

넵 위의 방법 시도해보시겠어요? ㅜ 저도 맥에서 비슷한 경험 한 적이 있긴 합니다

from seminar-2021.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.