python-sip

Issues with PyQt4 + SIP on Windows 10: Could not find a version that satisfies the requirement SIP (from versions: )

烈酒焚心 提交于 2019-12-24 20:54:26
问题 I have been trying to install SIP and PyQt4 + SIP for a while now under windows 10 in a Virtual env (legacy project so was done in PyQt4). I started in PyCharm using the package manager. I also tried command line. C:\Users\jspada>pip install SIP Collecting SIP Could not find a version that satisfies the requirement SIP (from versions: ) No matching distribution found for SIP C:\Users\jspada>pip install PyQt4 Collecting PyQt4 Could not find a version that satisfies the requirement PyQt4 (from

PyQt built on Windows: DLL load failed: The specified procedure could not be found

≯℡__Kan透↙ 提交于 2019-12-24 10:53:57
问题 I've tried to build PyQt from sources (with binary Qt 5.8.0 downloaded) on my Windows 7x64. I did it by this tutorial: https://stackoverflow.com/a/40779370/2726900 I've entered Visual Studio 2015 Command Prompt, activated vcvarsall.bat amd64 , activated qtenv2.bat . Than I configured, built and installed SIP (no errors). Than I configured PyQt (just added --sip C:/Python35/sip.exe ) and successfully built and installed PyQt. The filed like QtCore.pyi , QtCore.pyd , QtGui.pyi , QtGui.pyd and

SIP Makefile fail (gnuwin and mingw)

瘦欲@ 提交于 2019-12-23 22:31:10
问题 I have downloaded the Sip module for python 2.7, created a makefile and tried the make command on the directory with the makefile, but I get this error: Makefile:3: recipe for target 'all' failed mingw32-make[10]: *** [all] Error 2 mingw32-make[10]: Leaving directory 'D:/Users/myLogin/Downloads/python/sip-4.14.5' I get this error with both Gnuwin and mingw32. So I'm at a loss at what to do now. Any idea? 回答1: If you use python configure.py , the generated Makefile s are actually nmake

Can't import modules in python: PyQt4 conflicts with SIP

给你一囗甜甜゛ 提交于 2019-12-13 00:37:42
问题 I'm new and my english is not very well, but here I go: I have the newest Arch Linux on my PC and yesterday I tried to install SIP, a Python code generator for wrapping C++ codes. I tried to install SIP and PyQt4 under a virtual enviroment. I got SIP from the AUR, and installed it this way: http://lucacerone.net/2013/08/installing-pyqt4-and-sip-in-a-virtual-environment-ubuntu-1204/#.Uyx-dGd_phF/ I did it this way because on the official SIP-documentation website I didn't figure out where to

Python SIP expose function

别说谁变了你拦得住时间么 提交于 2019-12-11 23:41:43
问题 I'm writing a Python module for some C++ code using SIP. However whilst I can easily expose classes, I cannot find a way to expose standalone functions. Here is my header file defining the functions that I wish to expose to Python: ProxySettings.h #include <Windows.h> #include <Wininet.h> bool SetConnectionOptions(const char * proxy_full_addr); bool DisableConnectionProxy(); And here is my attempt at my SIP file so far: ProxySettings.sip . Currently running sip.exe generates C++ code with no

Error importing PyQt4.QtCore

醉酒当歌 提交于 2019-12-11 14:08:00
问题 I've been trying to get some GUI apps based on PyQt to run. Somewhere in the PPython scripts is the following import: from PyQt4.QtCore import * This is the error that I keep getting consistently. RuntimeError: the sip module implements API v8.0 to v8.1 but the PyQt4.QtCore module requires API v7.1 Why is this happening? How do I get sip to use the right API? Thanks 来源: https://stackoverflow.com/questions/11142358/error-importing-pyqt4-qtcore

Python binding for C++ operator overloading

江枫思渺然 提交于 2019-12-08 21:02:35
问题 I have a class similar to the following: class A { vector<double> v; double& x(int i) { return v[2*i]; } double& y(int i) { return v[2*i+1]; } double x(int i) const { return v[2*i]; } double y(int i) const { return v[2*i+1]; } } I want to have the following Python code work: a = A() a.x[0] = 4 print a.x[0] I was thinking of __setattr__ and __getattr__ , but not sure if it works. An alternative is to implement the following Python: a = A() a['x', 0] = 4 print a['x', 0] not as good as the

RuntimeError: the sip module implements API v8.0 to v8.1 but the PyQt4.QtCore module requires API v7.1

情到浓时终转凉″ 提交于 2019-12-08 02:32:37
问题 I manually installed PyQt-4.9.1 and sip-4.13.2 under /tmp/yifli because the ones currently installed on the machine (running Fedora 13) are too old for my software. After that, I added their locations to $PYTHONPATH and here is the output of sys.path: >>> import sys >>> print sys.path ['', '/tmp/yifli/lib/python/site-packages', '/tmp/yifli/lib/python/site-packages/PyQt4', '/usr/lib/python26.zip', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2', '/usr/lib/python2.6/lib-tk', '/usr/lib

RuntimeError: the sip module implements API v8.0 to v8.1 but the PyQt4.QtCore module requires API v7.1

天涯浪子 提交于 2019-12-06 04:29:25
I manually installed PyQt-4.9.1 and sip-4.13.2 under /tmp/yifli because the ones currently installed on the machine (running Fedora 13) are too old for my software. After that, I added their locations to $PYTHONPATH and here is the output of sys.path: >>> import sys >>> print sys.path ['', '/tmp/yifli/lib/python/site-packages', '/tmp/yifli/lib/python/site-packages/PyQt4', '/usr/lib/python26.zip', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2', '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old', '/usr/lib/python2.6/lib-dynload', '/usr/lib/python2.6/site-packages', '/usr/lib

How to force using 64 bit python on Mac OS X?

空扰寡人 提交于 2019-12-05 18:15:35
I got the following error when compiling sip with --arch x86_64 option. prosseek:siplib smcho$ python -c 'import sip; print sip' Traceback (most recent call last): File "", line 1, in ImportError: dlopen(./sip.so, 2): no suitable image found. Did find: ./sip.so: mach-o, but wrong architecture I found that the prebuilt Mac OS X python (snow leopard) is universal, and it doesn't get the 64 bit library. I guess it's running on 32bit mode. file /usr/bin/python /usr/bin/python: Mach-O universal binary with 3 architectures /usr/bin/python (for architecture x86_64): Mach-O 64-bit executable x86_64