跳转至内容
0
  • 版块
  • 讨论
  • 最新
  • 标签
  • 热门
  • 顶端
  • 用户
  • 版块
  • 讨论
  • 最新
  • 标签
  • 热门
  • 顶端
  • 用户
皮肤
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • 默认(Zephyr)
  • 不使用皮肤
折叠
JIKE社区
  1. 首页
  2. 讨论区
  3. 技术专区
  4. Centos 7 pip 安装 MySQL-python报错

Centos 7 pip 安装 MySQL-python报错

已定时 已固定 已锁定 已移动 技术专区
1 帖子 1 发布者 324 浏览
  • 从旧到新
  • 从新到旧
  • 最多赞同
回复
  • 在新帖中回复
登录后回复
此主题已被删除。只有拥有主题管理权限的用户可以查看。
  • 我是小马甲~M 在线
    我是小马甲~M 在线
    我是小马甲~
    🤫
    写于 最后由 编辑
    #1
    ERROR: Command errored out with exit status 1:
         command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-VslONa/mysql-python/setup.py'"'"'; __file__='"'"'/tmp/pip-install-VslONa/mysql-python/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-9mO07P
             cwd: /tmp/pip-install-VslONa/mysql-python/
        Complete output (10 lines):
        sh: mysql_config: command not found
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/tmp/pip-install-VslONa/mysql-python/setup.py", line 17, in <module>
            metadata, options = get_config()
          File "setup_posix.py", line 43, in get_config
            libs = mysql_config("libs_r")
          File "setup_posix.py", line 25, in mysql_config
            raise EnvironmentError("%s not found" % (mysql_config.path,))
        EnvironmentError: mysql_config not found
        ----------------------------------------
    ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
    
    
    

    解决方法:
    先执行命令

    yum install python-devel mysql-devel
    

    然后再安装

    pip install MySQL-python
    
    Collecting MySQL-python
      Using cached MySQL-python-1.2.5.zip (108 kB)
    Building wheels for collected packages: MySQL-python
      Building wheel for MySQL-python (setup.py) ... done
      Created wheel for MySQL-python: filename=MySQL_python-1.2.5-cp27-cp27m-linux_x86_64.whl size=84800 sha256=61305f58ce59ffa23fc950abea6270106838de0806c460fbfc1608218f83f8b0
      Stored in directory: /root/.cache/pip/wheels/55/eb/3b/661bdcd5ca5a576f0331400468db9d5dcbda118fb6c85fd3ee
    Successfully built MySQL-python
    Installing collected packages: MySQL-python
    Successfully installed MySQL-python-1.2.5
    
    

    唐宋元明清,连排小工兵!

    1 条回复 最后回复
    0
    回复
    • 在新帖中回复
    登录后回复
    • 从旧到新
    • 从新到旧
    • 最多赞同


    Popular Topics - 热门主题
    • 支付宝余额免费提现4种方式教程
      undefined
      1
      1
      652

    • 免费油管音乐客户端:Metrolist
      undefined
      1
      1
      132

    • 速度!9.9开美团年卡(12个月每月10张5元无门槛券)
      A
      abcpython
      0
      3
      348

    • 美団APP-首页~美团外卖点进去
      H
      ‍
      0
      2
      162

    • 盘古之殇:华为诺亚盘古大模型研发历程的心酸与黑暗
      孤
      孤傲的王
      0
      2
      67

    • 北京工行,搜索工行消费季,有50-10微信立减金
      undefined
      0
      1
      17

    • 登录

    • 没有帐号? 注册

    • 登录或注册以进行搜索。
    百度网盘
    1,569 个主题
    连续剧
    773 个主题
    国产剧
    603 个主题
    美剧
    359 个主题
    中国移动
    307 个主题
    动画片
    264 个主题
    动作片
    223 个主题
    中国电信
    222 个主题

    146

    在线

    40.9k

    用户

    40.7k

    主题

    111.2k

    帖子
    • 第一个帖子
      最后一个帖子