• mac 安装 mysqlclient


    mac 安装 mysqlclient 

    pip3 install mysqlclient
    Collecting mysqlclient
      Using cached https://files.pythonhosted.org/packages/f4/f1/3bb6f64ca7a429729413e6556b7ba5976df06019a5245a43d36032f1061e/mysqlclient-1.4.2.post1.tar.gz
    Building wheels for collected packages: mysqlclient
      Building wheel for mysqlclient (setup.py) ... error
      ERROR: Complete output from command /Library/Frameworks/Python.framework/Versions/3.6/bin/python3 -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/np/ctqs9s1n56v176z1v4j4_gsc0000gn/T/pip-install-v85uh_vq/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'
    '"'"', '"'"'
    '"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/np/ctqs9s1n56v176z1v4j4_gsc0000gn/T/pip-wheel-otcfaj8y --python-tag cp36:
      ERROR: running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.9-x86_64-3.6
      creating build/lib.macosx-10.9-x86_64-3.6/MySQLdb
      copying MySQLdb/__init__.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb
      copying MySQLdb/_exceptions.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb
      copying MySQLdb/compat.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb
      copying MySQLdb/connections.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb
      copying MySQLdb/converters.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb
      copying MySQLdb/cursors.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb
      copying MySQLdb/release.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb
      copying MySQLdb/times.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb
      creating build/lib.macosx-10.9-x86_64-3.6/MySQLdb/constants
      copying MySQLdb/constants/__init__.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb/constants
      copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb/constants
      copying MySQLdb/constants/CR.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb/constants
      copying MySQLdb/constants/ER.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb/constants
      copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb/constants
      copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb/constants
      running build_ext
      building 'MySQLdb._mysql' extension
      creating build/temp.macosx-10.9-x86_64-3.6
      creating build/temp.macosx-10.9-x86_64-3.6/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/8.0.16/include/mysql -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c MySQLdb/_mysql.c -o build/temp.macosx-10.9-x86_64-3.6/MySQLdb/_mysql.o
      gcc -bundle -undefined dynamic_lookup -arch x86_64 -g build/temp.macosx-10.9-x86_64-3.6/MySQLdb/_mysql.o -L/usr/local/Cellar/mysql/8.0.16/lib -lmysqlclient -lssl -lcrypto -o build/lib.macosx-10.9-x86_64-3.6/MySQLdb/_mysql.cpython-36m-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
      ----------------------------------------
      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: Complete output from command /Library/Frameworks/Python.framework/Versions/3.6/bin/python3 -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/np/ctqs9s1n56v176z1v4j4_gsc0000gn/T/pip-install-v85uh_vq/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'
    '"'"', '"'"'
    '"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/np/ctqs9s1n56v176z1v4j4_gsc0000gn/T/pip-record-nnm4wq71/install-record.txt --single-version-externally-managed --compile:
        ERROR: running install
        running build
        running build_py
        creating build
        creating build/lib.macosx-10.9-x86_64-3.6
        creating build/lib.macosx-10.9-x86_64-3.6/MySQLdb
        copying MySQLdb/__init__.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb
        copying MySQLdb/_exceptions.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb
        copying MySQLdb/compat.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb
        copying MySQLdb/connections.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb
        copying MySQLdb/converters.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb
        copying MySQLdb/cursors.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb
        copying MySQLdb/release.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb
        copying MySQLdb/times.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb
        creating build/lib.macosx-10.9-x86_64-3.6/MySQLdb/constants
        copying MySQLdb/constants/__init__.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb/constants
        copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb/constants
        copying MySQLdb/constants/CR.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb/constants
        copying MySQLdb/constants/ER.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb/constants
        copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb/constants
        copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.9-x86_64-3.6/MySQLdb/constants
        running build_ext
        building 'MySQLdb._mysql' extension
        creating build/temp.macosx-10.9-x86_64-3.6
        creating build/temp.macosx-10.9-x86_64-3.6/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/8.0.16/include/mysql -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c MySQLdb/_mysql.c -o build/temp.macosx-10.9-x86_64-3.6/MySQLdb/_mysql.o
        gcc -bundle -undefined dynamic_lookup -arch x86_64 -g build/temp.macosx-10.9-x86_64-3.6/MySQLdb/_mysql.o -L/usr/local/Cellar/mysql/8.0.16/lib -lmysqlclient -lssl -lcrypto -o build/lib.macosx-10.9-x86_64-3.6/MySQLdb/_mysql.cpython-36m-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
        ----------------------------------------
    ERROR: Command "/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/np/ctqs9s1n56v176z1v4j4_gsc0000gn/T/pip-install-v85uh_vq/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'
    '"'"', '"'"'
    '"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/np/ctqs9s1n56v176z1v4j4_gsc0000gn/T/pip-record-nnm4wq71/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/fol
    
    
    LDFLAGS=-L/usr/local/opt/openssl/lib pip3 install mysqlclient
  • 相关阅读:
    Mysql基本操作
    MySql架构
    并发中关键字的语义
    SpringMVC<一> 基本结构与配置
    Tomcat 顶层结构
    Linux 日常常用指令
    JSON 数据格式
    RMAN 增量备份级别说明
    Oracle常用数据库系统表单以及SQL的整理
    使用puTTY或Xshell连接阿里云TimeOut超时
  • 原文地址:https://www.cnblogs.com/morgana/p/11103589.html
Copyright © 2020-2023  润新知