<legend id='DrEOU'><style id='DrEOU'><dir id='DrEOU'><q id='DrEOU'></q></dir></style></legend>

        <bdo id='DrEOU'></bdo><ul id='DrEOU'></ul>
      <tfoot id='DrEOU'></tfoot>

    1. <i id='DrEOU'><tr id='DrEOU'><dt id='DrEOU'><q id='DrEOU'><span id='DrEOU'><b id='DrEOU'><form id='DrEOU'><ins id='DrEOU'></ins><ul id='DrEOU'></ul><sub id='DrEOU'></sub></form><legend id='DrEOU'></legend><bdo id='DrEOU'><pre id='DrEOU'><center id='DrEOU'></center></pre></bdo></b><th id='DrEOU'></th></span></q></dt></tr></i><div id='DrEOU'><tfoot id='DrEOU'></tfoot><dl id='DrEOU'><fieldset id='DrEOU'></fieldset></dl></div>
    2. <small id='DrEOU'></small><noframes id='DrEOU'>

      1. 在树莓派上安装 PyQt5 for Python3.6

        时间:2023-08-04

          <bdo id='psEQA'></bdo><ul id='psEQA'></ul>
          <legend id='psEQA'><style id='psEQA'><dir id='psEQA'><q id='psEQA'></q></dir></style></legend>
        • <small id='psEQA'></small><noframes id='psEQA'>

              <i id='psEQA'><tr id='psEQA'><dt id='psEQA'><q id='psEQA'><span id='psEQA'><b id='psEQA'><form id='psEQA'><ins id='psEQA'></ins><ul id='psEQA'></ul><sub id='psEQA'></sub></form><legend id='psEQA'></legend><bdo id='psEQA'><pre id='psEQA'><center id='psEQA'></center></pre></bdo></b><th id='psEQA'></th></span></q></dt></tr></i><div id='psEQA'><tfoot id='psEQA'></tfoot><dl id='psEQA'><fieldset id='psEQA'></fieldset></dl></div>
            1. <tfoot id='psEQA'></tfoot>
                    <tbody id='psEQA'></tbody>
                1. 本文介绍了在树莓派上安装 PyQt5 for Python3.6的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  由于我在较早的帖子和其他论坛中都找不到我的问题的答案,所以我想向 stackoverflow 社区寻求建议.

                  Since I found no answer for my question, neither in older posts nor in other forums, I want to ask the stackoverflow community for advice.

                  我使用的是树莓派 3B+,版本 9.4 (lite),内核版本为 4.14.71-v7.

                  I am using a raspberry pi 3B+, version 9.4 (lite) with kernel version 4.14.71-v7.

                  我使用python3.6.我是这样安装的:

                  I use python3.6. I installed it as follows:

                  sudo apt-get install build-essential checkinstall
                  sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
                  
                  cd /usr/src
                  sudo wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz
                  sudo tar xzf Python-3.6.0.tgz
                  
                  sudo -s
                  cd Python-3.6.0
                  bash configure
                  make altinstall
                  exit
                  

                  安装没有任何问题,一切正常.

                  Installation was without any trouble and everything works perfectly.

                  现在我想为 python3.6 安装 PyQt5 模块.我通常使用

                  Now I wanted to install the PyQt5 modul for python3.6. I usually use

                  sudo python3.6 -m pip install ...
                  

                  用于安装 python3.6 的模块.尝试

                  for installing a modul for python3.6. Trying

                  sudo python3.6 -m pip install pyqt5
                  

                  给我错误信息

                   Could not find a version that satisfies the requirement PyQt5 (from versions: )
                   No matching distribution found for PyQt5
                  

                  所以我尝试了

                  sudo apt-get update
                  sudo apt-get install qt5-default pyqt5-dev pyqt5-dev-tools
                  

                  但它在树莓派上安装了 PyQt5 for python3.5(预装).

                  But it installed PyQt5 for python3.5 (which is preinstalled) on the raspberry.

                  那么有没有人知道如何使用或安装 PyQt5 以供后续安装python3.6?

                  So does anybody know how to use or install PyQt5 for the subsequently installed python3.6?

                  编辑 08.03.2019:
                  感谢 FlyingTeller.我开始从源代码构建.我按照以下步骤操作你的链接.

                  Edit 08.03.2019:
                  Thanks FlyingTeller. I started to build from source. I followed the steps from your link.

                  sudo apt-get update
                  cd /usr/src
                  sudo wget https://www.riverbankcomputing.com/static/Downloads/sip/sip-4.19.14.tar.gz
                  sudo tar xzf sip-4.19.14.tar.gz
                  cd sip-4.19.14
                  sudo -s
                  python3.6 configure.py --sip-module=PyQt5.sip 
                  make
                  make install
                  
                  cd /usr/src
                  sudo wget https://www.riverbankcomputing.com/static/Downloads/PyQt5/PyQt5_gpl-5.12.tar.gz
                  sudo tar xzf PyQt5_gpl-5.12.tar.gz
                  cd PyQt5_gpl-5.12
                  python3.6 configure.py
                  

                  然后我收到以下错误

                  Error: Use the --qmake argument to explicitly specify a working Qt qmake.
                  

                  我认为我走对了,但我不明白 qmake 是什么或它是什么意思.

                  I think I am on the right way, but I do not understand what qmake is or what it means.

                  编辑 10.03.2019:
                  我可以解决最后一条错误消息.我安装了

                  Edit 10.03.2019:
                  I could solve the last error message. I installed

                  sudo apt-get install qt5-default
                  

                  然后我做了与已经提到的相同的程序.现在我得到错误

                  Then I did the same procedure as already mentioned. Now I get the error

                  fatal error: sip.h: File or directory not found 
                  #include <sip.h>
                  

                  PyQt5 config.py 位于:/usr/src/PyQt5_gpl-5.12
                  SIP sip.h 在:/usr/src/sip-4.19.14

                  PyQt5 config.py is in: /usr/src/PyQt5_gpl-5.12
                  SIP sip.h is in: /usr/src/sip-4.19.14

                  有人有想法吗?谢谢大家.

                  Anybody an idea? Thanks guys.

                  推荐答案

                  今天我找到了解决方案.以下步骤对我有用,没有任何错误.整个过程花了将近两个小时.

                  Today I found the solution. The steps below worked for me, without any error. The whole process took almost two hours.

                  sudo apt-get update
                  sudo apt-get install qt5-default
                  sudo apt-get install sip-dev
                  
                  cd /usr/src
                  sudo wget https://www.riverbankcomputing.com/static/Downloads/sip/sip-4.19.14.tar.gz
                  sudo tar xzf sip-4.19.14.tar.gz
                  cd sip-4.19.14
                  sudo python3.6 configure.py --sip-module PyQt5.sip
                  sudo make
                  sudo make install
                  
                  cd /usr/src
                  sudo wget https://www.riverbankcomputing.com/static/Downloads/PyQt5/PyQt5_gpl-5.12.tar.gz
                  sudo tar xzf PyQt5_gpl-5.12.tar.gz
                  cd PyQt5_gpl-5.12
                  sudo python3.6 configure.py
                  sudo make
                  sudo make install
                  

                  这篇关于在树莓派上安装 PyQt5 for Python3.6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何制作动态组合框PYQT5 下一篇:单击菜单标题时连接功能

                  相关文章

                  最新文章

                    <bdo id='WwI2G'></bdo><ul id='WwI2G'></ul>

                  <small id='WwI2G'></small><noframes id='WwI2G'>

                  1. <i id='WwI2G'><tr id='WwI2G'><dt id='WwI2G'><q id='WwI2G'><span id='WwI2G'><b id='WwI2G'><form id='WwI2G'><ins id='WwI2G'></ins><ul id='WwI2G'></ul><sub id='WwI2G'></sub></form><legend id='WwI2G'></legend><bdo id='WwI2G'><pre id='WwI2G'><center id='WwI2G'></center></pre></bdo></b><th id='WwI2G'></th></span></q></dt></tr></i><div id='WwI2G'><tfoot id='WwI2G'></tfoot><dl id='WwI2G'><fieldset id='WwI2G'></fieldset></dl></div>
                    1. <legend id='WwI2G'><style id='WwI2G'><dir id='WwI2G'><q id='WwI2G'></q></dir></style></legend>
                      <tfoot id='WwI2G'></tfoot>