pyQt4 for mac 安装

article/2025/9/9 12:46:26

因为想跨平台,所以考虑Qt,又想结合脚本的便捷。考虑PyQt


网上搜索了一下,资料挺少的。有的还是以前的资料。

参考这里 http://www.noktec.be/python/how-to-install-pyqt4-on-osx


0:下载安装xcode


1:下载安装Qt

http://qt-project.org/downloads

我下载的是Qt 5.0.2 for Mac (404 MB) (Info)

安装起来还挺方便的。不说了


2:下载SIP

http://www.riverbankcomputing.co.uk/software/sip/download

我下载的是 sip-4.16

下载以后解压

[plain]  view plain copy
  1. cd sip-4.16 
  2.   
  3. python configure.py -d /Library/Python/2.7/site-packages --arch=i386  
  4.   
  5. make  
  6.   
  7. sudo make install  

安装起来没问题。


3:下载PyQt4


http://www.riverbankcomputing.co.uk/software/pyqt/download

我下载的是 PyQt-mac-gpl-4.11

下载后解压安装配置这里要参考改版后的配置文档,新版本用的是configure-ng.py:

http://pyqt.sourceforge.net/Docs/PyQt4/installation.html#configuring-pyqt4


命令:

python configure-ng.py -q /Users/wjqfkfyh/Qt5.0.2/5.0.2/clang_64/bin/qmake -d /Library/Python/2.7/site-packages/ --sip /System/Library/Frameworks/Python.framework/Versions/2.7/bin/sip --sysroot /System/Library/Frameworks/Python.framework/Versions/2.7

[plain]  view plain copy
  1. cd PyQt-mac-gpl-4.11 
  2.   
  3. python configure-ng.py -q /Users/watsy/Qt5.0.2/5.0.2/clang_64/bin/qmake -d /Library/Python/2.7/site-packages/ --sip /System/Library/Frameworks/Python.framework/Versions/2.7/bin/sip  --sysroot /System/Library/Frameworks/Python.framework/Versions/2.7
  4.   
  5. make  
  6.   
  7. sudo make install  


以上步骤完成以后,运行demo

[python]  view plain copy
  1. #!/usr/bin/python  
  2. # -*- coding: utf-8 -*-  
  3.   
  4. """ 
  5. ZetCode PyQt4 tutorial  
  6.  
  7. In this example, we create a simple 
  8. window in PyQt4. 
  9.  
  10. author: Jan Bodnar 
  11. website: zetcode.com  
  12. last edited: October 2011 
  13. """  
  14.   
  15. import sys  
  16. from PyQt4 import QtGui  
  17.   
  18. def main():  
  19.   
  20.   
  21.   
  22.     app = QtGui.QApplication(sys.argv)  
  23.   
  24.     w = QtGui.QWidget()  
  25.     w.resize(250150)  
  26.     w.move(300300)  
  27.     w.setWindowTitle('Simple')  
  28.     w.show()  
  29.       
  30.     sys.exit(app.exec_())  
  31.   
  32.   
  33. if __name__ == '__main__':  
  34.     main()  

执行得到如下错误

[python]  view plain copy
  1. Traceback (most recent call last):  
  2.   File "pyqtDemo.py", line 16in <module>  
  3.     from PyQt4 import QtGui  
  4. ImportError: dlopen(/Library/Python/2.7/site-packages/sip.so, 2): no suitable image found.  Did find:  
  5.     /Library/Python/2.7/site-packages/sip.so: mach-o, but wrong architecture  

在考虑是什么问题

查看

[plain]  view plain copy
  1. lipo -info /Library/Python/2.7/site-packages/sip.so  

得到

[plain]  view plain copy
  1. Non-fat file: /Library/Python/2.7/site-packages/sip.so is architecture: i386  

想来现在机器用的是64位系统了。

修改 sip的配置从新编译

[python]  view plain copy
  1. cd sip-4.16 
  2.   
  3. python configure.py -d /Library/Python/2.7/site-packages --arch=x86_64  
  4.   
  5. make  
  6.   
  7. sudo make install  


注意:1、如果需要卸载安装的PyQt4,使用如下命令:

                  sudo make uninstall

            2、下载sip和PyQt必须使用GPL版本,商业版是需要证书的。

            3、sip和PyQt最好使用相近的版本!!!!

            4、在编译PyQt4时候出错,且出现“sipQtCoreQSysInfo.cpp文件中没有定义:MV_10_9、MV_10_10等“,解决方法是将../QtCore/sipQtCoreQSysInfo.cpp文件中的对应行删除!!!!

            5、安装时候不能包含中文目录!


安装完以后运行demo



4:sip和PyQt下载地址

PyQt4:http://sourceforge.net/projects/pyqt/files/PyQt4/

sip:http://sourceforge.net/projects/pyqt/files/sip/



5:参考资料

Installing PyQt4¶

Downloading SIP¶

SIP must be installed before building and using PyQt4. You can get the latest release of the SIP source code from http://www.riverbankcomputing.com/software/sip/download.

The SIP documentation can be found at http://pyqt.sourceforge.net/Docs/sip4/.

Downloading PyQt4¶

You can get the latest release of the GPL version of the PyQt4 source code from http://www.riverbankcomputing.com/software/pyqt/download.

If you are using the commercial version of PyQt4 then you should use the download instructions which were sent to you when you made your purchase. You must also download your license file.

Configuring PyQt4¶

After unpacking the source package (either a .tar.gz or a .zip file depending on your platform) you should then check for any README files that relate to your platform.

If you are using the commercial version of PyQt4 then you must copy your license file to the sip directory, or to the directory specified by the --license-dir option of configure-ng.py.

You need to make sure your environment variables are set properly for your development environment.

In order to configure the build of PyQt4 you need to run either the configure-ng.py or the configure.py script.

configure.py is the original configuration script that uses the build system of SIP v4 (i.e. the sip.sipconfig module). It will be supported for the life of PyQt4.

configure-ng.py is the new configuration script that uses Qt’s qmake program to do all the heavy lifting. It has the following advantages:

  • it supports cross-compilation
  • it is the basis of PyQt5’s configuration script
  • generated Makefiles have an uninstall target
  • it will work with SIP v5 (which will have no build system).

Users are encouraged to switch to using configure-ng.py in order to ease the future transition to SIP v5 and/or PyQt5.

Using configure-ng.py

New in version 4.10.1.

The configure-ng.py script is used to configure PyQt4 as follows:

python configure-ng.py

This assumes that the Python interpreter is on your path. Something like the following may be appropriate on Windows:

c:\python34\python configure-ng.py

If you have multiple versions of Python installed then make sure you use the interpreter for which you wish to build PyQt4 for.

The full set of command line options is:

--assume-shared

Normally Qt is checked to see if it has been built as shared libraries. Some Linux distributions configure their Qt builds to make this check unreliable. This option ignores the result of the check and assumes that Qt has been built as shared libraries.

--bindir  <DIR> -b  <DIR>

The pyuic4pyrcc4 and pylupdate4 utilities will be installed in the directory <DIR>.

--concatenate -c

The C++ source files for a Python module will be concatenated. This results in significantly reduced compilation times. Most, but not all, C++ compilers can handle the large files that result. See also the --concatenate-split option.

--concatenate-split  <N> -j  <N>

If the --concatenate option is used to concatenate the C++ source files then this option determines how many files are created. The default is 1.

--configuration  <FILE>

<FILE> contains the configuration of the PyQt4 build to be used instead of dynamically introspecting the system and is typically used when cross-compiling. See Configuring with Configuration Files.

--confirm-license

Using this confirms that you accept the terms of the PyQt4 license.

--dbus  <DIR> -s  <DIR>

The dbus-python.h header file of the dbus-python package can be found in the directory <DIR>/dbus.

--debug -u

The PyQt4 modules will be built with debugging symbols. On Windows this requires that a debug version of Python is installed.

--designer-plugindir  <DIR>

The Python plugin for Qt Designer will be installed in the directory <DIR>.

--destdir  <DIR> -d  <DIR>

The PyQt4 Python package will be installed in the directory <DIR>. The default is the Python installation’s site-packages directory. If you use this option then the PYTHONPATH environment variable must include<DIR>.

--enable  <MODULE> -e  <MODULE>

Normally all PyQt4 modules are enabled and are built if the corresponding Qt library can be found. Using this option only those modules specifically enabled will be checked for and built. The option may be specified any number of times.

--help -h

Display a help message.

--license-dir  <DIR>

The license files needed by the commercial version of PyQt4 can be found in the directory <DIR>.

--no-deprecated

All Qt v4 features that have been deprecated in Qt v5 will be disabled. This is useful when porting PyQt4 applications to PyQt5.

--no-designer-plugin

The Qt Designer plugin will not be built.

--no-docstrings

The PyQt4 modules will not contain automatically generated docstrings.

--no-python-dbus

The Qt support for the standard Python DBus bindings is disabled.

--no-qsci-api

The PyQt4.api QScintilla API file is not installed even if QScintilla does appear to be installed.

--no-sip-files

The .sip files for the PyQt4 modules will not be installed.

--no-tools

New in version 4.11.

The pyuic4pyrcc4 and pylupdate4 tools will not be built.

--no-timestamp -T

Normally the header comments of each generated C/C++ source file includes a timestamp corresponding to when the file was generated. This option suppresses the inclusion of the timestamp.

--plugin  <PLUGIN> -t  <PLUGIN>

If Qt has been built as static libraries then the static plugin <PLUGIN> will be linked with the appropriate PyQt4 module. The option may be specified any number of times.

--protected-is-public

On certain platforms the size of PyQt4 modules can be significantly reduced by redefining the C++ protected keyword as public during compilation. This option enables this behaviour and is the default on Linux and MacOS/X.

--protected-not-public

The default redefinition of protected to public during compilation on Linux and MacOS/X is disabled.

--pyuic4-interpreter  <FILE>

<FILE> is the name of the Python interpreter used in the pyuic4 wrapper. The default is platform dependent.

--qmake  <FILE> -q  <FILE>

Qt’s qmake program is used to determine how your Qt installation is laid out. Normally qmake is found on your PATH. This option can be used to specify a particular instance of qmake to use. This option is not available on Windows where qmake must be on PATH.

--qsci-api -a

The PyQt4.api QScintilla API file is installed even if QScintilla does not appear to be installed. This option is implied if the --qsci-api-destdir option is specified.

--qsci-api-destdir  <DIR> -n  <DIR>

The QScintilla API file will be installed in the python subdirectory of the api subdirectory of the directory <DIR>.

--sip  <FILE>

The sip program is used to generate PyQt4’s C++ source code. Normally sip is found on your PATH. This option can be used to specify a particular instance of sip to use.

--sip-incdir  <DIR>

The sip.h header file can be found in the directory <DIR>.

--sipdir  <DIR> -v  <DIR>

The .sip files for the PyQt4 modules will be installed in the directory <DIR>.

--spec  <SPEC>

The argument -spec SPEC will be passed to qmake. The default behaviour is platform specific. On Windows configure-ng.py will choose the value that is correct for the version of Python that is being used. (However if you have built Python yourself then you may need to explicitly specify <SPEC>.) On MacOS configure-ng.py will try and avoid macx-xcode if possible.)

--static -k

The PyQt4 modules will be built as static libraries. This is useful when building a custom interpreter with the PyQt4 modules built in to the interpreter.

--sysroot  <DIR>

New in version 4.11.

<DIR> is the name of an optional directory that replaces sys.prefix in the names of other directories (specifically those specifying where the various PyQt4 components will be installed and where the Python include and library directories can be found). It is typically used when cross-compiling or when building a static version of PyQt4. See Configuring with Configuration Files.

--target-py-version  <VERSION>

New in version 4.11.

<VERSION> is the major and minor version (e.g. 3.4) of the version of Python being targetted. By default the version of Python being used to run the configure.py script is used. It is typically used when cross-compiling. See Configuring with Configuration Files.

--trace -r

The generated PyQt4 modules contain additional tracing code that is enabled using SIP’s sip.settracemask() function.

--verbose -w

Compiler commands and any output issued during configuration is displayed instead of being suppressed. Use this if configure-ng.py is having problems to see what exactly is going wrong.

--version

Display the PyQt4 version number.

Any remaining command line arguments are expected to be in the form name=value or name+=value. Such arguments are added to any qmake .pro file created by configure-ng.py.

Using configure.py

The configure.py script is used to configure PyQt4 as follows:

python configure.py

This assumes that the Python interpreter is on your path. Something like the following may be appropriate on Windows:

c:\python34\python configure.py

If you have multiple versions of Python installed then make sure you use the interpreter for which you wish to build PyQt4 for.

The full set of command line options is:

--assume-shared

Normally Qt is checked to see if it has been built as shared libraries. Some Linux distributions configure their Qt builds to make this check unreliable. This option ignores the result of the check and assumes that Qt has been built as shared libraries.

--bindir  <DIR> -b  <DIR>

The pyuic4pyrcc4 and pylupdate4 utilities will be installed in the directory <DIR>.

--concatenate -c

The C++ source files for a Python module will be concatenated. This results in significantly reduced compilation times. Most, but not all, C++ compilers can handle the large files that result. See also the --concatenate-split option.

--concatenate-split  <N> -j  <N>

If the --concatenate option is used to concatenate the C++ source files then this option determines how many files are created. The default is 1.

--confirm-license

Using this confirms that you accept the terms of the PyQt4 license.

--consolidate -g

Normally each PyQt4 module (except for the Qt module) is linked against the corresponding Qt library. This option creates a module called _qt which is linked against all the required Qt libraries and the other modules are stub modules that populate their module dictionaries from this one. This is useful when linking against static Qt libraries to eliminate the need to distribute the Qt libraries while minimising the memory footprint of the PyQt4 modules.

--dbus  <DIR> -s  <DIR>

The dbus-python.h header file of the dbus-python package can be found in the directory <DIR>/dbus.

--debug -u

The PyQt4 modules will be built with debugging symbols. On Windows this requires that a debug version of Python is installed.

--destdir  <DIR> -d  <DIR>

The PyQt4 Python package will be installed in the directory <DIR>. The default is the Python installation’s site-packages directory. If you use this option then the PYTHONPATH environment variable must include<DIR>.

--enable  <MODULE> -e  <MODULE>

Normally all PyQt4 modules are enabled and are built if the corresponding Qt library can be found. Using this option only those modules specifically enabled will be checked for and built. The option may be specified any number of times.

--help -h

Display a help message.

--no-deprecated

All Qt v4 features that have been deprecated in Qt v5 will be disabled. This is useful when porting PyQt4 applications to PyQt5.

--no-designer-plugin

The Qt Designer plugin will not be built.

--no-docstrings

The PyQt4 modules will not contain automatically generated docstrings.

--no-qsci-api

The PyQt4.api QScintilla API file is not installed even if QScintilla does appear to be installed.

--no-sip-files

The .sip files for the PyQt4 modules will not be installed.

--no-timestamp -T

Normally the header comments of each generated C/C++ source file includes a timestamp corresponding to when the file was generated. This option suppresses the inclusion of the timestamp.

--plugin  <PLUGIN> -t  <PLUGIN>

If Qt has been built as static libraries then the static plugin <PLUGIN> will be linked with the appropriate PyQt4 module. The option may be specified any number of times.

--plugin-destdir  <DIR> -p  <DIR>

The Qt Designer plugin that manages plugins implemented in Python will be installed in the designer subdirectory of the directory <DIR>.

--protected-is-public

On certain platforms the size of PyQt4 modules can be significantly reduced by redefining the C++ protected keyword as public during compilation. This option enables this behaviour and is the default on Linux and MacOS/X.

--protected-not-public

The default redefinition of protected to public during compilation on Linux and MacOS/X is disabled.

--qmake  <FILE> -q  <FILE>

Qt’s qmake program is used to determine how your Qt installation is laid out. Normally qmake is found on your PATH. This option can be used to specify a particular instance of qmake to use. This option is not available on Windows.

--qsci-api -a

The PyQt4.api QScintilla API file is installed even if QScintilla does not appear to be installed. This option is implied if the --qsci-api-destdir option is specified.

--qsci-api-destdir  <DIR> -n  <DIR>

The QScintilla API file will be installed in the python subdirectory of the api subdirectory of the directory <DIR>.

--sipdir  <DIR> -v  <DIR>

The .sip files for the PyQt4 modules will be installed in the directory <DIR>.

--static -k

The PyQt4 modules will be built as static libraries. This is useful when building a custom interpreter with the PyQt4 modules built in to the interpreter.

--trace -r

The generated PyQt4 modules contain additional tracing code that is enabled using SIP’s sip.settracemask() function.

--use-arch  <ARCH>

When pyuic4 calls the Python interpreter on MacOS it will be run using the architecture <ARCH>. See the section Configuring SIP and PyQt4 for MacOS.

--verbose -w

Compiler commands and any output issued during configuration is displayed instead of being suppressed. Use this if configure.py is having problems to see what exactly is going wrong.

--version

Display the PyQt4 version number.

Configuring SIP and PyQt4 for MacOS¶

Note that this section only applies if you are using the configure.py script to configure PyQt4. The configure-ng.py script leaves it to Qt’s qmake program to handle the details. configure-ng.py does not support the creation of universal binaries.

Building applications for MacOS can be a complex process. Typically the following need to be taken into account:

  • the architectures (i.e. i386, x86_64, ppc) that you want to support
  • the earliest version of MacOS you want to support (i.e. the deployment target)
  • the version of the SDK you want to use.

If you are using a binary installer for Python and/or Qt then you also need to consider how they have been built regarding the above, and what bugs they have.

SIP’s and PyQt4’s configure.py scripts provide the necessary command line options to allow the correct configurations to be specified - the trick is to work out which options to use depending on the versions of Python and Qt you have installed.

SIP provides the following command line options to its configure.py script.

  • --arch <ARCH> specifies the target architecture and may be specified a number of times.
  • --universal is a shortcut for --arch i386 --arch ppc.
  • --deployment-target <VERSION> specifies the earliest version of MacOS you want to support. This sets the MACOSX_DEPLOYMENT_TARGET environment variable and should be used rather than setting the environment variable in the shell (to work around bugs in some versions of Python).
  • --sdk <SDK> specifies the SDK to use.

PyQt4 provides the --use-arch option that specifies which architecture certain PyQt4 tools (actually only pyuic4 at the moment) will use when running Python. For example, if your Qt installation is 32 bits, and your Python installation is 32 bits and 64 bits then you will need to specify --use-arch i386 to ensure that pyuic4 runs the 32 bit version of Python.

Building PyQt4¶

The next step is to build PyQt4 by running your platform’s make command. For example:

make

The final step is to install PyQt4 by running the following command:

make install

(Depending on your system you may require root or administrator privileges.)

This will install the various PyQt4 components.

Configuring with Configuration Files¶

The configure.py script normally introspects the Python installation of the interpreter running it in order to determine the names of the various files and directories it needs. This is fine for a native build of PyQt4 but isn’t appropriate when cross-compiling. In this case it is possible to supply a configuration file, specified using the --configuration option, which contains definitions of all the required values.

A configuration file is made up of a number of named sections each of which contains a number of configuration items. The format of a configuration file is as follows:

  • a section name is a single line with the name enclosed between [ and ]
  • a configuration item is a single line containing a name/value pair separated by =
  • values may be extended to lines immediately following if they are indented by at least one space
  • a value may include another value by embedding the name of that value enclosed between %( and )
  • comments begin with # and continue to the end of the line
  • blank lines are ignored.

Those configuration items that appear before the first section name are automatically added to all sections.

A configuration file defines a section for each version of Qt that requires a different configuration. configure.py will choose the most appropriate section according to the version of Qt you are actually using. For example, if a configuration file contains sections for Qt v5.3 and Qt v5.1 and you are using Qt v5.2.1 then the section for Qt v5.1 will be chosen.

configure.py provides the following preset values for a configuration:

py_major
is the major version number of the target Python installation.
py_minor
is the minor version number of the target Python installation.
sysroot
is the name of the system root directory. This is specified with the  --sysroot option.

The following is an example configuration file:

# The target Python installation.
py_platform = linux
py_inc_dir = %(sysroot)/usr/include/python%(py_major).%(py_minor)
py_pylib_dir = %(sysroot)/usr/lib/python%(py_major).%(py_minor)/config
py_pylib_lib = python%(py_major).%(py_minor)mu# The target PyQt installation.
pyqt_module_dir = %(sysroot)/usr/lib/python%(py_major)/dist-packages
pyqt_bin_dir = %(sysroot)/usr/bin
pyqt_sip_dir = %(sysroot)/usr/share/sip/PyQt4
pyuic_interpreter = /usr/bin/python%(py_major).%(py_minor)
pyqt_disabled_features = PyQt_Desktop_OpenGL PyQt_qreal_double# Qt configuration common to all versions.
qt_shared = True[Qt 5.1]
pyqt_modules = QtCore QtDBus QtDesigner QtGui QtHelp QtMultimediaQtMultimediaWidgets QtNetwork QtOpenGL QtPrintSupport QtQml QtQuickQtSensors QtSerialPort QtSql QtSvg QtTest QtWebKit QtWebKitWidgetsQtWidgets QtXmlPatterns _QOpenGLFunctions_ES2

This example contains a section for Qt v5.1. We have defined a number of values before the start of the section as they are not specific to any particular version of Qt. Note that if you use this configuration with a version of Qt earlier than v5.1 then you will get an error.

The following values can be specified in the configuration file:

qt_shared
is set if Qt has been built as shared libraries. The default value is  False.
py_platform
is the target Python platform.
py_inc_dir
is the target Python include directory, i.e. the directory containing the  Python.h file.
py_pylib_dir
is the target Python library directory.
py_pylib_lib
is the target Python interpreter library. It should not include any platform-specific prefix or suffix.
pyqt_disabled_features
is the space separated list of features (as defined by SIP’s  %Feature directive) that should be disabled.
pyqt_module_dir
is the target directory where the PyQt4 modules will be installed. It can be overridden by the  --destdir option.
pyqt_modules
is the space separated list of PyQt4 modules that will be built. It can be overridden by the  --enable option.
pyqt_bin_dir
is the name of the target directory where the PyQt4 related executables will be installed. It can be overridden by the  --bindir option.
pyqt_sip_dir
is the name of the target directory where the PyQt4  .sip files will be installed. It can be overridden by the  --sipdir option.
pyuic_interpreter
is the name of the Python interpreter (as it would be called from the target system) that will be used to run  pyuic4. It can be overridden by the  --pyuic4-interpreter option.


http://chatgpt.dhexx.cn/article/MPgi2Zgs.shtml

相关文章

from PyQt4 import QtGui,QtCore出错

from PyQt4 import QtGui,QtCore出错 今天尝试着安装PyQt写界面&#xff0c;官网下载后发现import QtGui出错了&#xff0c;情况如下图&#xff1a; 提示DLL load faied 找了下网上有些人说是某些dll文件丢失了&#xff0c;但我发现都在&#xff1b; 于是我尝试了多种方法后发…

pyqt4安装问题小结(一)

这几天一直在配python图形化程序所需的库&#xff0c;但安装pyqt4的过程很难过。所以记下来回想一下这几天经历了些什么…… 我的环境是windows8.1python2.7 首先 因为在https://riverbankcomputing.com/software/pyqt/download/下载pyqt4现已不支持windows系统二进制程序&a…

pyQt4导入问题:ImportError: No module named PyQt4

一开始&#xff0c;我是同时安装了两个python环境&#xff0c;python2.7和python3.6,之后才安装的pyQt4。 在pycharm中就出现了ImportError: No module named PyQt4。 这个问题应该是两个python环境出现的问题&#xff0c;具体的原因并不清楚。 但是我们可以有如下的解决办法…

PyQt4---QTextBrowser

browser QTextBrowser() #实例化一个textbrowser browser.append(‘sdfsdfds’) #追加内容 browser.setOpenLinks(True) #打开文档内部链接 默认为True browser.setOpenExternalLinks(True) #打开外部链接 默认false 当openlinks设置false时 该选项无效 textbrowser.setSe…

pyqt4安装方法

1.安装python&#xff0c;我使用的是python-2.7.13.msi 。注意&#xff1a;&#xff08;1.我的python是64位&#xff1b;2.需要将python中的安装路径python.exe路径配置到系统环境变量中&#xff09; 2.安装pyqt4&#xff0c;由于有现成的安装包&#xff0c;所以很简单&#x…

PyQt4 - (1) PyQt4简介

关于这个教程 这是一个PyQt4的简单教程&#xff0c;目的就是为了让大家对PyQt4有个初步的了解。 关于PyQt PyQt是一个GUI库&#xff0c;是将Python和Qt结合在一起的产物。而Qt是目前比较成功和强大的GUI库。你可以通过访问www.riverbankcomputing.co.uk了解更…

PyQt4入门教程(1)_PyQt介绍及准备工作

注&#xff1a;文章中译者自己的话将用方括号【】括出。 本节将对PyQt4进行介绍【我还会教大家怎样做好准备工作——开发环境的配置】。本教程的目的是让你可以开始使用PyQt4工具包进行开发&#xff0c;教程中的事例测试在Linux上进行。 关于PyQt4 PyQt4是用来编写有图形界面…

PyQt4安装使用以及pycharm环境配置

根据自己的python版本下载对应的pyqt4离线包&#xff0c;现在连接&#xff1a;下载地址 比如我地python版本是python3.7&#xff0c;我选择PyQt4‑4.11.4‑cp37‑cp37m‑win32.whl 使用命令行pip指令安装离线包&#xff1a; pip install PyQt4‑4.11.4‑cp37‑cp37m‑win32.w…

pageoffice相关问题整理

2019独角兽企业重金招聘Python工程师标准>>> pageoffice 正常使用的条件&#xff1a; 1、服务器上正常注册了pageoffice ; 2、本地访问用的机器安装了office软件 &#xff1b; 3、本地机器安装了pageoffice客户端 posetup &#xff1b; 问题解决方法&#xff1b; 1、…

激活码方式注册的实现原理述

1. 软件授权方式概述 目前&#xff0c;商用软件和共享软件绝大部份都是采用注册码授权的方式来保证软件本身不被盗用&#xff0c;以保证自身的利益。尽管很多常用的许多软件系统的某些版本已经被别人破解&#xff0c;但对于软件特殊行业而言&#xff0c;注册码授权的方式还是一…

【Office激活】学校正版Office已激活成功仍弹出激活窗口

学校正版Office激活问题&#xff1a;已激活成功仍弹出激活窗口 内容大纲 学校正版Office激活问题&#xff1a;已激活成功仍弹出激活窗口一、问题描述二、问题分析三、解决方法1.修改操作路径到相应的Office文件夹下2.查看当前Office的激活Key状态3.卸载多余的Key 四、解决效果 …

PageOffice国产版的授权及离线注册

2021年初开始&#xff0c;pageOffice推出了国产操作系统的客户端版本&#xff0c;现在在国产操作系统上&#xff0c;也可以使用pageOffice实现在线编辑office文档的功能。 很多开发者在集成国产操作系统的成功后&#xff0c;弹出了注册框&#xff0c;但是不知为什么总是不能注…

uos专业版与个人版区别_win+Android /wps办公软件官方专业版,内附激活码!

❈ 软件介绍 Office软件是平常用的最多的软件之一,除了微软的MS Office用户最多的就是国产的WPS了。WPS分为个人版和专业版,WPS个人版虽然免费,但附带了一些广告和推送。不喜欢有广告的小伙伴可以用村长今天分享提供的WPS专业pj版。只需要输入wps专业版序列号即可轻松激…

新电脑自带的office密钥在哪里?

新电脑自带的office密钥在哪里&#xff1f;最近有用户询问这个问题&#xff0c;相信还有些用户不清楚&#xff0c;买的电脑一般都会预装office&#xff0c;那么买电脑送的office激活码在哪里查看呢&#xff1f; 纯净之家-win7纯净版系统_win7 ghost 纯净版 方法一、 1、首先打…

d2j-dex2jar.sh classes.dex 反编译报错

之前用的是dex2jar-2.0.zip&#xff0c;后来又用了dex2jar-2.1.zip&#xff0c;仍然报错。 参考&#xff1a;https://www.jianshu.com/p/55bf5f688e9a 用ultraedit打开classes.dex文件&#xff0c; 将“039”改成“036”&#xff0c;然后正常反编译。

dex2jar 反编译apk 报错 error.zip 的解决

dex2jar 反编译apk 有如下报错&#xff0c;完整报错如图片&#xff1a; Detail Error Information in File .\GtsSettingsTestCases-classes-error.zip Please report this file to http://code.google.com/p/dex2jar/issues/entry if possible. 打开 error.zip&#xff0c;报…

apktool,dex2jar,jd-gui简单使用与实战

前言 最近项目里要实现一个TimePicker&#xff0c;类似于这样的 我一看&#xff0c;瞬间想起了手机上的某APP&#xff0c;他上面就刚好有类似的效果 本来项目时间就有点赶&#xff0c;自己慢慢写这个控件时间上也有点来不及了&#xff0c;而且他又那么的像&#xff0c;于是&am…

d2j-dex2jar之DexException :not support version

近期使用dex2jar反编译apk&#xff0c;遇到报错&#xff0c;这里记录下解决过程。 命令详细错误如下&#xff1a; ./d2j-dex2jar.sh ../classes.dex dex2jar ../classes.dex -> ./classes-dex2jar.jar com.googlecode.d2j.DexException: not support version.at com.googl…

用apktool和dex2jar反编译

一&#xff0c;利用apktool反编译 1&#xff0c;首先在 http://code.google.com/p/android-apktool/downloads/list 下载两个文件&#xff1a;apktool1.4.3.tar.bz2 和apktool-install-windows-r04-brut1.tar.bz2 2&#xff0c;解压第一个文件得到apktool1.4.3.jar 放到c:…

Android apk反编译之旅——(二)dex2jar-2.0和jd-gui1.4的使用

【上一篇】Android apk反编译之旅——&#xff08;一&#xff09;apktool下载、安装及使用已经讲了如何使用apktool2.3.1反编译工具&#xff0c;得到res和xml文件&#xff0c;现在介绍使用dex2jar-2.0和jd-gui1.4编译得到java源码的方法。 PS. dex2jar-2.0和jd-gui1.4是较新版…