超级集-无法使用SQLAlchemy导入数据库。库未加载错误

时间:2019-05-23 02:08:28

标签: python python-3.x virtualenv python-3.6

我在本地主机上运行Apache超集。但是,当我使用SQLAlchemy URI创建数据库时,超集会引发以下错误:

  

错误:{“错误”:“连接失败!\ n \ n返回的错误消息是:\ ndlopen(/usr/local/lib/python3.6/site-packages/MySQLdb/_mysql.cpython-36m-darwin .so,2):未加载库:libssl.1.0.0.dylib \ n引用自:/usr/local/lib/python3.6/site-packages/MySQLdb/_mysql.cpython-36m-darwin.so\n原因:找不到图片“}

我在/ usr / local / lib中建立了以下符号链接。我的python3驻留在/ usr / local / bin / python3

    1. _mysql.cpython-36m-darwin.so-> /usr/local/lib/python3.6/site-packages/MySQLdb/_mysql.cpython-36m-darwin.so
    1. MySQLdb-> /usr/local/lib/python3.6/site-packages/MySQLdb
    1. libmysqlclient.21.dylib-> /usr/local/mysql/lib/libmysqlclient.21.dylib

我必须为libssl.1.0.0.dylib创建某种符号链接吗?

.bash_profile路径如下:

export PATH="/usr/local/opt/python/libexec/bin:$PATH"
export PATH="/usr/local/mysql/bin:$PATH"
export JAVA_HOME=/Library/Java/JavaVirtualMachines/openjdk-12.0.1.jdk/Contents/Home
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$DYLD_LIBRARY_PATH
export PATH="/usr/local/opt/openssl/bin:$PATH"
export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"

我需要导入数据库以进行超集设置,但是我被困在这里。

0 个答案:

没有答案