<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ## 導語 > 在Centos7下,當前python版本是2.7.5,測試實時獲取日志然后解析入庫中,安裝`MySQL-python`模塊報錯如 `EnvironmentError: mysql_config not found`,原因是缺少了 mysql 相關支持。 > 這里把解決過程記錄一下 --- 環境信息 系統: Centos7.2 Python 版本: 2.7.5 --- 具體報錯信息: ``` root@pts/4 $ pip install MySQL-python Collecting MySQL-python Using cached MySQL-python-1.2.5.zip Complete output from command python setup.py egg_info: sh: mysql_config: command not found Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-kWowP9/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 ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-kWowP9/MySQL-python/ ``` --- mysql_config是來自于 `mysql-devel` ,我用的是MySQL社區版,所以實際安裝的是`mysql-community-devel`,網上的說法是同時安裝`python-devel`,如果你沒有安裝的話一起安裝 yum install python-devel mysql-community-devel -y 安裝完成之后嘗試再次 pip 安裝 MySQL-python --- ## 再次安裝 ``` root@pts/4 $ pip install MySQL-python Collecting MySQL-python Using cached MySQL-python-1.2.5.zip Installing collected packages: MySQL-python Running setup.py install for MySQL-python ... done Successfully installed MySQL-python-1.2.5 ``` --- ## 驗證 ``` root@pts/1 $ python Python 2.7.5 (default, Sep 15 2016, 22:37:39) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import MySQLdb >>> MySQLdb. MySQLdb.BINARY MySQLdb.OperationalError( MySQLdb.__hash__( MySQLdb.debug( MySQLdb.Binary( MySQLdb.ProgrammingError( MySQLdb.__init__( MySQLdb.escape( MySQLdb.Connect( MySQLdb.ROWID MySQLdb.__name__ MySQLdb.escape_dict( MySQLdb.Connection( MySQLdb.STRING MySQLdb.__new__( MySQLdb.escape_sequence( MySQLdb.DATE MySQLdb.TIME MySQLdb.__package__ MySQLdb.escape_string( MySQLdb.DATETIME MySQLdb.TIMESTAMP MySQLdb.__path__ MySQLdb.get_client_info( MySQLdb.DBAPISet( MySQLdb.Time( MySQLdb.__reduce__( MySQLdb.paramstyle MySQLdb.DataError( MySQLdb.TimeFromTicks( MySQLdb.__reduce_ex__( MySQLdb.release MySQLdb.DatabaseError( MySQLdb.Timestamp( MySQLdb.__repr__( MySQLdb.result( MySQLdb.Date( MySQLdb.TimestampFromTicks( MySQLdb.__revision__ MySQLdb.server_end( MySQLdb.DateFromTicks( MySQLdb.Warning( MySQLdb.__setattr__( MySQLdb.server_init( MySQLdb.Error( MySQLdb.__all__ MySQLdb.__sizeof__( MySQLdb.string_literal( MySQLdb.FIELD_TYPE MySQLdb.__author__ MySQLdb.__str__( MySQLdb.test_DBAPISet_set_equality( MySQLdb.IntegrityError( MySQLdb.__class__( MySQLdb.__subclasshook__( MySQLdb.test_DBAPISet_set_equality_membership( MySQLdb.InterfaceError( MySQLdb.__delattr__( MySQLdb.__version__ MySQLdb.test_DBAPISet_set_inequality( MySQLdb.InternalError( MySQLdb.__dict__ MySQLdb._mysql MySQLdb.test_DBAPISet_set_inequality_membership( MySQLdb.MySQLError( MySQLdb.__doc__ MySQLdb.apilevel MySQLdb.thread_safe( MySQLdb.NULL MySQLdb.__file__ MySQLdb.connect( MySQLdb.threadsafety MySQLdb.NUMBER MySQLdb.__format__( MySQLdb.connection( MySQLdb.times MySQLdb.NotSupportedError( MySQLdb.__getattribute__( MySQLdb.constants MySQLdb.version_info >>> >>> MySQLdb.version_info (1, 2, 5, 'final', 1) >>> ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看