• Mac pip install mysql-python


    首次在mac os 下,用pip install MySQL-Python时经常出现如下错误:

    sh: mysql_config: command not found
    Traceback (most recent call last):
      File "setup.py", line 15, in <module>
        metadata, options = get_config()
      File "/Users/***/Downloads/MySQL-python-1.2.3/setup_posix.py", line 43, in get_config
        libs = mysql_config("libs_r")
      File "/Users/***/Downloads/MySQL-python-1.2.3/setup_posix.py", line 24, in mysql_config
        raise EnvironmentError("%s not found" % (mysql_config.path,))
    EnvironmentError: mysql_config not found

    经过一翻百度查找,百度表示它知道的解决方法一概都不可行,经过一番尝试,真正的解决方法应该是:

    去mysql官网,下载

    http://dev.mysql.com/downloads/mysql/

    mysql并且安装

    安装完成后,打开终端,输入下方语句修改环境变量:

    PATH="$PATH":/usr/local/mysql/bin

    好了,现在重启终端,并输入

    pip install mysql-python

    然后问题就顺利解决了。

     
     
  • 相关阅读:
    Linux kernel pwn (四): Bypass SMEP
    Linux kernel pwn(三):Double Fetch
    Linux kernel pwn (二):UAF
    vue安装
    html标签
    javascript简介
    html样式 CSS(Cascading Style Sheets)
    html标签
    scala基础——scala变量
    elasticsearch日常维护
  • 原文地址:https://www.cnblogs.com/lize3379/p/6775123.html
Copyright © 2020-2023  润新知