Questions tagged [python-sip]

SIP is a python library used to port native C/C++ APIs into Python. SIP was originally written to manage the complex interfaces required by PyQT; however, it has general usage for anyone wishing to port C/C++ code into Python.

SIP is a python library used to port native C/C++ APIs into Python. SIP was originally written to manage the complex interfaces required by PyQT; however, it has general usage for anyone wishing to port C/C++ code into Python.

138 questions
32
votes
5 answers

Location of global libraries for Python on Mac?

I'm fighting with installation SIP for Python on Mac OS X. Finally after compilation and installation when I run console form folder of SIP (locally) I can import sipconfig, but when I`m in other folder I cant - there is no module called…
michaltaberski
  • 633
  • 1
  • 10
  • 17
22
votes
7 answers

Prototyping with Python code before compiling

I have been mulling over writing a peak-fitting library for a while. I know Python fairly well and plan on implementing everything in Python to begin with but envisage that I may have to re-implement some core routines in a compiled language…
Brendan
  • 18,771
  • 17
  • 83
  • 114
15
votes
3 answers

How to check if a library is 32bit/64bit built on Mac OS X?

I'm having some trouble in using PyQt/SIP. I guess the SIP is compiled into 64bit, but Python has some problem with finding it. File "qtdemo.py", line 46, in import sip ImportError: dlopen(/Library/Python/2.6/site-packages/sip.so, 2): no…
prosseek
  • 182,215
  • 215
  • 566
  • 871
13
votes
1 answer

Python-C integration: Ctypes, CFFI or create a Binary Module

Basically I want to make a Python program call functions written in C. So (as far as I know) my options are: CTypes/CFFI Create a DLL/SO/DyLib containing the C functions and access them using CTypes or CFFI. Apparently CFFI is way faster with the…
romulof
  • 357
  • 2
  • 12
12
votes
4 answers

RuntimeError: the sip module implements API v11.0 to v11.2 but the PyQt5.QtCore module requires API v11.3

I recently installed PyQt4 onto my system and started doing some basic tasks (course work), it worked fine. Then, after some days, I was trying to work with matplotlib. When I tried import matplotlib.pyplot as plt,I get the following…
Pragyaditya Das
  • 1,648
  • 6
  • 25
  • 44
10
votes
2 answers

Import hooks for PyQt4.QtCore

I'm am attempting to setup some import hooks through sys.meta_path, in a somewhat similar approach to this SO question. For this, I need to define two functions find_module and load_module as explained in the link above. Here is my load_module…
rth
  • 10,680
  • 7
  • 53
  • 77
7
votes
5 answers

PyQt5 error "PyCapsule_GetPointer called with incorrect name"

I've just built PyQt5 in a pyenv virtualenv with python 3.6.3 on OpenSUSE leap, the build went fine, but when I import >>> from PyQt5 import QtCore Traceback (most recent call last): File "", line 1, in ValueError:…
Pedru
  • 1,430
  • 1
  • 14
  • 32
7
votes
3 answers

How to install SIP & PyQT on windows 7

I'm a newbie to Python environment & really struggling to install SIP & PyQt on my Win 7 machine. This is what I've done so far, I've downloaded SIP-4.16.9 and extracted files from the zip folder The extracted folder is then copied to…
SanVEE
  • 2,009
  • 5
  • 34
  • 55
6
votes
2 answers

pip3 install PyQt5 --user fails

Errors are present when trying to install PyQt5 via pip3. The automated message wants me to add more detail, but I don't have any. All the detail is in the code. ➜ ~ pip3 install PyQt5 --user Collecting PyQt5 Retrying (Retry(total=4,…
user2522165
  • 73
  • 1
  • 1
  • 6
6
votes
3 answers

VirtualEnv not setting paths correctly, unable to use installed module

Short Version: How do I have PyQt4's configure.py use the SIP version installed in the Virtual Env? Long version: I know variations on this question have been asked like a million times here but I cannot seem to find the answer. I am trying to…
jspada
  • 481
  • 1
  • 6
  • 24
6
votes
0 answers

Can I use SIP to generate Python binding for my Qt C++ library then call it in PySide?

I have to choose PySide due to the license. But its Shiboken tool is so lack of documentations. I can't successfuly generate a binding for my Qt C++ libraries. Looks like SIP is more mature at least on the documentation part. Is it possible for me…
zhongzhu
  • 307
  • 2
  • 4
  • 14
6
votes
2 answers

Why are SIP and PyQt4 not getting along

I do most of my work in Windows and have a good python27 set up like I like it. I recently installed virtualBox and got a Ubuntu Machine running on it and am trying to get PyQt4 installed on it. I installed from apt-get and updated everything,…
Matt
  • 954
  • 2
  • 9
  • 21
6
votes
2 answers

Incorrect check of SIP version during PyQt installation

I have been trying to install PyQt on my mac (OSX 10.6.8), but I still having this problem: When I try to install PyQt-mac-gpl-4.9.6, I get this Error: This version of PyQt requires SIP v4.14.2 or later. The weird thing is that when I want to…
user1903428
  • 63
  • 1
  • 1
  • 3
6
votes
1 answer

Python binding for C++ operator overloading

I have a class similar to the following: class A { vector 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];…
Forest Yang
  • 179
  • 5
5
votes
3 answers

Python method resolution mystery

I can't figure out why this program is failing. #!/usr/bin/env python from __future__ import division, print_function from future_builtins import * import types import libui as ui from PyQt4 import QtCore import sip p = ui.QPoint() q =…
Neil G
  • 32,138
  • 39
  • 156
  • 257
1
2 3
9 10