search

Home  >  Q&A  >  body text

linux默认python版本升级成2.7后怎么安装mysql包

我把之前Linux上默认的python2.6版本升级到2.7后,重新yum install MySQL-python后
还是不能使用!怎么才能导入这个库呀。。跪求大神指点

巴扎黑巴扎黑2786 days ago601

reply all(5)I'll reply

  • ringa_lee

    ringa_lee2017-04-18 10:29:37

    • Go to pypi to download the module package

    • Unzip

    • There is INSTALL to enter

    • python setup.py install
      That’s it

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-18 10:29:37

    Download the source code and reinstall it
    http://blog.csdn.net/yanyamin...

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-18 10:29:37

    Download and install pip
    https://bootstrap.pypa.io/get...

    python2.7 get-pip.py

    Install MySQL-python

    pip2.7 install MySQL-python

    reply
    0
  • PHPz

    PHPz2017-04-18 10:29:37

    The original poster can search for python virtualenv which is very useful. Various python versions, various packages

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-18 10:29:37

    https://pypi.python.org/pypi/...
    Download the zip, unzip it, enter the folder, python setup.py install

    reply
    0
  • Cancelreply