import MySQLdb UserWarning
2015-07-18 17:00
716 查看
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目录中;但我在当前目录也存在相同的模块,所以可能会重复导入。只要切换到其他目录运行就可以了。
╭─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目录中;但我在当前目录也存在相同的模块,所以可能会重复导入。只要切换到其他目录运行就可以了。
相关文章推荐
- MySQL学习笔记——增删改查
- mysql主从复制replication的一些相关命令
- mysql 1093
- mysql数据库导出导入
- Mysql 上一条 下一条记录
- Mysql 数据库创建基本步骤
- Win7和Ubuntu下mysql 安装配置
- 修改MySQL命令提示符
- mysql 序列创建函数
- MySql重置密码
- mysql的函数
- mysql之union
- MySQL高效获取记录总数
- mysql如何创建一个定时事件
- mysql如何创建一个定时事件
- 如何更改MYSQL登入密码方法 修改ph…
- hive安装同时以mysql为元数据库
- window安装mysql方法图解
- MySQL 添加列、修改列、删除列的方法
- MySQL 错误