• import MySQLdb UserWarning


    Finished processing dependencies for MySQL-python==1.2.5
    ╭─haoke@haokedeMBP ~/ProgramFiles/MySQL-python-1.2.5
    ╰─$ python
    Python 2.7.6 (default, Sep  9 2014, 15:04:36)
    [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import MySQLdb
    /Library/Python/2.7/site-packages/MySQL_python-1.2.5-py2.7-macosx-10.10-intel.egg/_mysql.py:3: UserWarning: Module _mysql was already imported from /Library/Python/2.7/site-packages/MySQL_python-1.2.5-py2.7-macosx-10.10-intel.egg/_mysql.pyc, but /Users/haoke/ProgramFiles/MySQL-python-1.2.5 is being added to sys.path

    >>> exit();


    原因是。install后MySQLdb模块已经被放到python的site-pachages文件夹中;但我在当前文件夹也存在同样的模块,所以可能会反复导入。

    仅仅要切换到其它文件夹执行就能够了。

  • 相关阅读:
    SaltStack 配置SLS过程
    Python 正则表达式
    Python 矩阵的旋转
    SaltStack 远程执行
    SaltStack 配置管理
    SaltStack
    Python 装饰器
    Python 生产者和消费者模型
    Python 迭代器和生成器
    Python json模块
  • 原文地址:https://www.cnblogs.com/gccbuaa/p/6728757.html
Copyright © 2020-2023  润新知