Ubuntu安装Python的mysqlclient
介绍
本人想在Ubuntu上开发Python程序,使用MySQL数据库。
安装环境: Ubuntu14.04
安装MySQL数据库
具体步骤如下:
apt-get update
apt-get install python-pip (已经有pip命令则跳过此步骤)
apt-get install mysql-server
apt-get install mysql-client
安装mysqlclient
具体步骤如下:
apt-get install libmysql-dev
apt-get install libmysqlclient-dev
apt-get install python-dev
pip install mysqlclient
其他
在windows上开发
- 如果你使用Python2.7,下载网站为:https://pypi.python.org/pypi/mysqlclient。
- 如果你使用Python3.5,下载网站为:http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python
我下载的是 mysqlclient-1.3.9-cp35-cp35m‑win_amd64.whl
它是wheel包管理端的。所以需要安装wheel包支持。
$ pip install wheel
$ pip install /path/mysqlclient.whl
错误1:is not a supported wheel on this platform.
这个错误是由于版本不对应。cp27是指python2.7版本。
下载与你自己安装的python版本对应的版本就OK了。
https://my.oschina.net/HIJAY/blog/484759
参考:
Ubuntu安装Python的mysqlclient的更多相关文章
- 在安装python的mysqlclient包时报microsoft visual c++ 14.0 is required的错误
在安装python的mysqlclient包时报microsoft visual c++ 14.0 is required的错误 pip install mysqlclient 提示报错 解决办法 ...
- ubuntu 安装python,easy_install和pip
ubuntu12.04默认安装的python为 ms@ubuntums:~$ pythonPython 2.7.3 (default, Aug 1 2012, 05:16:07) 我需要用python ...
- 安装ubuntu系统及ubuntu安装Python的几点心得
一.安装ubuntu系统 1.ubuntu系统是Linux系统的一种,和centos差别不大,但是个人还是建议大家安装ubuntu,它更适合国内使用习惯,换句话说更亲切. 2.安装方法不再赘述,网上有 ...
- ubuntu安装python MySQLdb模块
本文讲述了python安装mysql-python的方法.分享给大家供大家参考,具体如下: ubuntu 系统下进行的操作 首先安装了pip工具 ? 1 sudo apt-get install py ...
- 在ubuntu安装python, theano, keras , Spearmint, Mongodb
系统配置: Ubuntu 14 (其他系统也差不多如下操作) 1. 通过anaconda安装 python 地址: https://www.continuum.io/downloads#linux 2 ...
- Ubuntu安装Python 3.6之编译安装+使用PPA源安装
下面分别详细介绍一下Ubuntu 14.04/16.04安装Python 3.6的两种方法: 方法一 自己编译安装: # 安装编译必需的软件包 sudo apt install build-essen ...
- ubuntu安装Python环境以及科学计算环境
参考:http://blog.csdn.net/a1311543690/article/details/ 1.sudo apt-get install python-pip pip是Python的一个 ...
- ubuntu 安装python 编程环境
1. 安装python sudo add-apt-repository ppa:fkrull/deadsnakessudo apt-get updatesudo apt-get install pyt ...
- Ubuntu安装Python机器学习包
1.安装pip $ mkdir ~/.pip $ vi ~/.pip/pip.conf [global] trusted-host=mirrors.aliyun.com index-url=http: ...
随机推荐
- 10、Semantic-UI之图片的使用
10.1 图片的使用 定义有边框的图片样式 <img class="ui medium bordered image" src="../images/pic.png ...
- Ubuntu下使用UFW,以及CentOS7的默认防火墙firewalld
UFW是一个简化版的iptables,基于iptables,配置比iptables简单 默认UFW是关闭状态,即Ubuntu默认打开所有端口,比较危险. 检测状态 ufw status 设置默认状态, ...
- JavaScript函数参数问题
声明一个回调函数 function(){ alert(data); } 这个时候,若调用这个函数的传入了一个同名data,则这里会引用到data的值,因为他们处于同一作用域.
- 【C#】泛型
泛型是一个非常有用的技术,在博客园里面有太多说到泛型的好文章,这里我推荐一篇我个人觉得非常全面,也非常齐全的文章. (重造轮子很傻!!!) C# -- 泛型(1) C# -- 泛型(2) C# -- ...
- [raspberry p3] [suse] 安装maven
[raspberry p3] [suse] 安装maven 配置package repositroy, 添加devel:tools:building vim /etc/zypp/repos.d/ope ...
- 系统数据库--恢复Master数据库
实现步骤:关闭SQL SERVER 服务,使用DAC登录 在cmd下还原master 重启SQL SERVER 服务
- IO--RAID
RAID IO计算 Raid 0 –每个磁盘的I/O计算= (读+写) /磁盘个数 Raid 1 --每个磁盘的I/O计算= [读+(2*写)]/2 Raid 5 --每个磁盘的I/O计算= [读+( ...
- [VSTO] warning CS0467 解决方案
warning CS0467: Ambiguity between method 'Microsoft.Office.Interop.Word._Document.Close(ref object, ...
- 【git】常用命令
// 下载Git项目git clone url // 显示当前git配置git config --list // 设置用户信息git config --global user.name "& ...
- c# 求两个数中最大的值
1.三元运算符: class Program { static void Main(string[] args) { ,); Console.WriteLine("最大数:{0}" ...