我的运行环境为:

硬件:树莓派3b

系统:ubuntu_meta_16.04.2

  因为项目需要,我在树莓派上搭建了基于python编程的Django的web框架,需要从MySQL中读取树莓派以及传感器的数据,而Python3是不带PyMySQL的,所以就需要我们自行安装。

  在安装过程中我一直卡在Building wheels for collected package:cryptography, cffi, pycparser


  经过1天的各种查找问题,最后终于还是被幸运女神眷顾!!!

下面是我的解决办法:

1、首先出现这个问题是因为在安装cryptography之前,缺少必要的包,这里我采取cryptography, cffi, pycparser单独安装的策略

1)、安装 pycparser:

  1. pip3 install pycparser

安装pycparser成功!!!

2)、安装 cffi:

  1. pip3 install cffi

这个时候安装失败,提示安装cryptography和cffi

3)、安装 cryptography:

  1. pip3 install cryptography

这时候一直卡在Building wheels for collected package:cryptography, cffi

问题还是没有解决!

2、经过各种查找资料,在官网中看到发现安装cryptography前需要安装:build-essential、libssl-dev、libffi-dev、python-dev 这四个包

附上官网大大的地址:https://cryptography.io/en/latest/installation/#supported-platforms

1)、cryptography需要使用OpenSSL,更新OpenSSL:

  1. sudo apt-get install openssl

2)、安装build-essential、libssl-dev、libffi-dev、python-dev 这四个包

  1. sudo apt-get install build-essential libssl-dev libffi-dev python3-dev

3)、安装 cffi:

  1. pip3 install cffi

安装cffi成功!!!

4)、安装 cryptography:

  1. pip3 install cryptography

这时候也还是一直卡在Building wheels for collected package:cryptography

难道幸运女神还没到!!!

3、并没有放弃,有网上找了些资料,继续干

1)、重新安装过 libffi:

  1. .wget ftp://sourceware.org/pub/libffi/libffi-3.0.11.tar.gz
  2. .tar zxvf libffi-3.0..tar.gz
  3. .cd libffi-3.0./    
  4. ../configure
  5. .make  
  6. .sudo make install (这里需要注意一定要在sudo下进行安装,如果直接make install的话不会安装好)

2)、重新安装过 PyMySQL:

  1. #使用 git 命令下载安装包安装(你也可以手动下载):
  2. $ git clone https://github.com/PyMySQL/PyMySQL
  3. $ cd PyMySQL/
  4. $ python3 setup.py install

这个时候又一直卡在Building wheels for collected package:cryptography, cffi, pycparser

3)、重新安装build-essential、libssl-dev、libffi-dev、python-dev 这四个包

  1. sudo apt-get install build-essential libssl-dev libffi-dev python-dev

4)、重新安装 cryptography

提示找不到合适的cryptography包

5)、更新 pip:

  1. pip install --upgrade pip

6)、重新安装 cryptography

  1. pip3 install cryptography

还是一直卡在Building wheels for collected package:cryptography, cffi, pycparser

7)、重新安装 pycparser:

  1. pip3 install pycparser

这个时候 pycparser 完全成功!!!!

8)、重新安装 cffi:

  1. pip3 install cffi

这个时候 cffi 完全成功!!!!

9)、重新安装 cryptography

  1. pip3 install cryptography

这个时候 cryptography 完全成功!!!!

10)、安装 PyMySQL:

  1. pip3 install PyMySQL

成功!!!!赶快关个机,备份下

天啊,鬼知道我经历了什么,一顿瞎操作终于是好了

参考资料:https://www.cnblogs.com/xiaoli2018/p/4661604.html

        http://www.cnblogs.com/iOS-mainstay/p/5596608.html

    

解决安装PyMySQL一直停在Building wheels for collected package:cryptography, cffi, pycparser的问题的更多相关文章

  1. Windows下Android Studio长时间停留在Building "Project Name" Gradle project info画面的解决方法

    问题描述: 创建好一个Android项目后,Android Studio长时间停留在Building [Project Name] Gradle project info画面不动. 原因: 此时And ...

  2. 安装VMWare tools,以及解决安装后/mnt中有hgfs但没共享文件的方法

    一.首先是安装VMWare tools   安装过程可参考:Installing VMware Tools in an Ubuntu virtual machine   安装成功后,可看的如下信息: ...

  3. mac多版本python安装 pymysql

    系统里面安装了多个python的版本,有2.7和3.4等.默认的2.7版本,但我开发需要3.4版本的. 默认情况下,用pip安装PyMySQL $sudo pip install PyMySQL 安装 ...

  4. 解决 安装或卸载软件时报错Error 1001 的问题

    卸载或安装程序时出错1001:错误1001可能发生在试图更新.修复或卸载windows os中的特定程序时.此问题通常是由于程序的先前安装损坏而引起的. 错误“1001”通常会遇到,因为程序的先前安装 ...

  5. 如何解决安装VMware后郑广电宽带客户端不能登录的问题?

    如何解决安装VMware后郑广电宽带客户端不能登录的问题? 问题:安装VMware后,郑广电宽带客户端不能登录,提示:“不允许代理上网”. 解决:将VMware的虚拟网卡(VMnet1和VMnet8) ...

  6. 解决安装mysqlclient出现问题:mysql_config: not found

    解决安装mysqlclient出现如下问题: Complete output from command python setup.py egg_info: /bin/sh: : mysql_confi ...

  7. 解决python pymysql.err.OperationalError: (2013, 'Lost connection to MySQL server during query')

    解决python pymysql.err.OperationalError: (2013, 'Lost connection to MySQL server during query') 学习了:ht ...

  8. python 下安装pymysql数据库

    两种方法来安装pymysql 方法一.利用命令来安装 安装:python37 -m pip install pymysql 升级:python37 -m pip install pymysql --u ...

  9. windows环境下安装pymysql(操作带图)

    在windows环境下安装pymysql,首先要找到python的安装位置,如果在c盘,启动cmd的时候,要获取管理员权限. 具体步骤,一,管理员模式启动cmd.在箭头指定位置,搜索cmd,出现快捷方 ...

随机推荐

  1. .net C# Chart控件的简单使用

    1.拖控件Chart 到界面 2. 清除默认的序列  chart1.Series.Clear();   3.生成一个序列,并添加到chart1中,序列可添加多个  Series s1 = new Se ...

  2. Spring - jdbcTemplate - 调试代码: PreparedStatementCreator 生成的语句, update 之后没有 自增id, 已解决

    1. 概述 解决 jdbcTemplate 下, update 结果不带 自增id 的问题 2. 场景 看书 Spring in Action 5th 3.1.4 listing 3.10 saveT ...

  3. python自动更新升级失败解决方案

    1,使用python -m pip install --upgrade pip升级失败 2,使用python -m pip install -U --force-reinstall pip依然失败 3 ...

  4. springboot项目部署到服务器上

    链接:https://blog.csdn.net/qq_22638399/article/details/81506448#commentsedit 链接2:https://blog.csdn.net ...

  5. 如何利用wx.request进行post请求

    1,method 是  get  方式的时候,会将数据转换成 query string method 为 post 时,header为{"Content-Type": " ...

  6. 吴裕雄 人工智能 java、javascript、HTML5、python、oracle ——智能医疗系统WEB端智能分诊代码简洁版实现

    <%-- Document : getInfo Created on : 2018-10-7, 21:36:37 Author : acer --%> <%@page import= ...

  7. 文本编辑器EditPlus的安装

  8. HTML+CSS—背景图片、图片定位

    设置背景图片格式: background-image: url(img/ic.jpg); 注意点: 如果父容器面积大于背景图片,默认显示该图片整面平铺 设置是否需要平铺属性: background-r ...

  9. dfs(迷宫)

    问题 J: 棋盘行走 时间限制: 1 Sec  内存限制: 128 MB[命题人:admin] 题目描述 小Biu在玩一个棋盘游戏,这个游戏给出一个n*m的棋盘,并且每个点上有一个棋子,棋子的颜色 用 ...

  10. H2知识小结

    1.官网: http://www.h2database.com/html/main.html file:///E:/Develop/H2/docs/html/tutorial.html#web_app ...