mysqlubuntupython
我在ubuntu14.4上面操作,python2.7,mysql5.5 ,用了virtualenv,
当我在虚拟环境外安装好mysql-connector-python_2.0.4-1ubuntu14.04_all.deb后可以正常使用,
think@think-Inspiron-N4050:~/download$ sudo dpkg -i mysql-connector-python_2.0.4-1ubuntu14.04_all.deb [sudo] password for think: Selecting previously unselected package mysql-connector-python.(reading databse ...)Preparing to unpack mysql-connector-python_2.0.4-1ubuntu14.04_all.deb ...Unpacking mysql-connector-python (2.0.4-1ubuntu14.04) ...setting mysql-connector-python (2.0.4-1ubuntu14.04) ...think@think-Inspiron-N4050:~/download$ python Python 2.7.6 (default, Jun 22 2015, 18:00:18) [GCC 4.8.2] on linux2Type "help", "copyright", "credits" or "license" for more information.>>> import mysql.connector>>> exit()
我需要在virtualenv环境下使用,于是我又在venv环境里安装了一个,安装正常,但是无法引入
品牌咖啡茶饮网站管理系统是一款开源的,衍生于优秀的内容管理系统易优cms。 品牌咖啡茶饮网站管理系统秉承了易优CMS的先进设计理念,并且专注于餐饮企业。 品牌咖啡茶饮网站管理系统特点: 简单方便 品牌咖啡茶饮网站管理系统源码包安装十分方便,只需输入域名,然后再点两次鼠标,期间填入一些必要的安装信息就可以轻松完成整个安装过程。 使用十分便捷,安装后进后台,无需事先进行任何设置操作。 要进行网站设置
(venv)think@think-Inspiron-N4050:~/download$ dpkg -i mysql-connector-python_2.0.4-1ubuntu14.04_all.deb (venv)think@think-Inspiron-N4050:~/download$ sudo dpkg -i mysql-connector-python_2.0.4-1ubuntu14.04_all.deb (reading database ... )Preparing to unpack mysql-connector-python_2.0.4-1ubuntu14.04_all.deb ...Unpacking mysql-connector-python (2.0.4-1ubuntu14.04) over (2.0.4-1ubuntu14.04) ...setting mysql-connector-python (2.0.4-1ubuntu14.04) ...(venv)think@think-Inspiron-N4050:~/download$ python Python 2.7.6 (default, Jun 22 2015, 18:00:18) [GCC 4.8.2] on linux2Type "help", "copyright", "credits" or "license" for more information.>>> import mysql.connectorTraceback (most recent call last): File "", line 1, in ImportError: No module named mysql.connector
请各位老师指点一下,谢谢









