日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

python3安装mysqlclient_Python3 安装mysqlclient错误处理(MAC版)

發布時間:2023/12/9 数据库 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 python3安装mysqlclient_Python3 安装mysqlclient错误处理(MAC版) 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

在使用django的時候需要安裝mysqlclient庫,很多時候會出現以下報錯:

running install

running bdist_egg

running egg_info

writing mysqlclient.egg-info/PKG-INFO

writing dependency_links to mysqlclient.egg-info/dependency_links.txt

writing top-level names to mysqlclient.egg-info/top_level.txt

reading manifest file 'mysqlclient.egg-info/SOURCES.txt'

reading manifest template 'MANIFEST.in'

writing manifest file 'mysqlclient.egg-info/SOURCES.txt'

installing library code to build/bdist.macosx-10.9-x86_64/egg

running install_lib

running build_py

creating build

creating build/lib.macosx-10.9-x86_64-3.7

creating build/lib.macosx-10.9-x86_64-3.7/MySQLdb

copying MySQLdb/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb

copying MySQLdb/_exceptions.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb

copying MySQLdb/compat.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb

copying MySQLdb/connections.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb

copying MySQLdb/converters.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb

copying MySQLdb/cursors.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb

copying MySQLdb/release.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb

copying MySQLdb/times.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb

creating build/lib.macosx-10.9-x86_64-3.7/MySQLdb/constants

copying MySQLdb/constants/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb/constants

copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb/constants

copying MySQLdb/constants/CR.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb/constants

copying MySQLdb/constants/ER.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb/constants

copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb/constants

copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb/constants

running build_ext

building 'MySQLdb._mysql' extension

creating build/temp.macosx-10.9-x86_64-3.7

creating build/temp.macosx-10.9-x86_64-3.7/MySQLdb

gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Dversion_info=(1,4,2,'post',1) -D__version__=1.4.2.post1 -I/usr/local/Cellar/mysql-connector-c/6.1.11/include -I/Users/zhouwanghua/Code/python/WorkPlatFormApi/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c MySQLdb/_mysql.c -o build/temp.macosx-10.9-x86_64-3.7/MySQLdb/_mysql.o

gcc -bundle -undefined dynamic_lookup -arch x86_64 -g build/temp.macosx-10.9-x86_64-3.7/MySQLdb/_mysql.o -L/usr/local/Cellar/mysql-connector-c/6.1.11/lib -lmysqlclient -lssl -lcrypto -o build/lib.macosx-10.9-x86_64-3.7/MySQLdb/_mysql.cpython-37m-darwin.so

ld: library not found for -lssl

clang: error: linker command failed with exit code 1 (use -v to see invocation)

error: command 'gcc' failed with exit status 1

主要的報錯信息是這個:

ld: library not found for -lssl # 主要信息在這里,gcc找不到這個庫

解決方法

brew install openssl

export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/

創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎

總結

以上是生活随笔為你收集整理的python3安装mysqlclient_Python3 安装mysqlclient错误处理(MAC版)的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。