How do you install mysql-connector-python (development version) through pip?
2016-09-17 07:40
736 查看
12down votefavorite 8 | http://stackoverflow.com/questions/31748278/how-do-you-install-mysql-connector-python-development-version-through-pip/34027037#34027037 I have a virtualenv in which I am running Django 1.8 with Python 3.4 I am trying to get support for MySQL however I am having trouble getting the different connectors to work. I have always used mysql-connector-python with django 1.7 and would like to continue using it. The development version of mysql-connector-python (2.1.2) seems to have support for Django 1.8 now. How do I install the development version using pip install (within my virtualenv)? I have tried running the following command: pip install mysql-connector-python==2.1.2 --allow-external mysql-connector-python but the 2.1.2 developer version is not available there: could not find a version that satisfies the requirement mysql-connector-python==2.1.2 (from versions: 1.1.4, 1.1.5, 1.1.6, 1.2.2, 1.2.3, 2.0.1, 2.0.2, 2.0.3, 2.0.4) Some insecure and unverifiable files were ignored (use --allow-unverified mysql-connector-python to allow). No matching distribution found for mysql-connector-python==2.1.2 I have tried downloading the file directly from: http://dev.mysql.com/downloads/connector/python/ ...but for some reason after installation the connector is not available within my virtualenv Help please :-) Thank you. ' EDIT: I have tried pip install mysql-pythonbut it is not supported by Python 3.4 python mysql django
| |||
1 Answer 1
active oldest votesup vote27down vote | I agree, the debian packages appear to be broken for at least Ubuntu 14.04. The apt-get version and the pip version do not include the 2.1.x releases. To get it done, I had to grab the source: $ git clone https://github.com/mysql/mysql-connector-python.git $ cd mysql-connector-python $ python ./setup.py build $ sudo python ./setup.py install ... >>> import mysql.connector as msc >>> msc.__version__ '2.1.3' >>> |
相关文章推荐
- python pip install mysql-connector-python
- pip install mysql-connector-python安装时报错
- pip install mysql-connector-python安装时报错不满足requirement
- pip install mysql-connector-python-rf 出现... not recognised解决方案
- 不用pip安装mysql-connector-python:从github上边下载安装
- 在LInux上安装:mysql C connector :How to install MySQL Connector/C on Mac OS X?
- raspberry install mysql-connector-python
- How Do You Test Connectivity Through ODBC Data Sources Created by Siebel? (Doc ID 475610.1)
- pip install mysql-python 提示myql_config not found
- pip install mysql-python
- Python2.7-pip install MySQL-python失败的问题
- pip install MySQL-python error
- [Tips]使用 pip v1.5 安装 MySQL Connector/Python
- centos pip install MySql-python
- How to install pip3 for python 3.x
- 解决Python下pip install MySQL-python失败的问题
- Installing MySQL Connector/Python using pip v1.5
- How do you read from stdin in Python?
- 记录解决Python下pip install MySQL-python失败的问题
- CentOS7上 pip install MySQL-python 安装失败(error: command 'gcc' failed with exit status 1)的解决办法