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
0
votes
1 answer

Transition from single to multi module project with python SIP

I have trouble doing an import of foo_a in foo_b. Lets say the toplevel-package defined in both the .toml files will be called foo.sip. That means e.g. the pyproject.toml of foo_b looks like this: # Specify sip v6 as the build system for the…
0
votes
1 answer

How to translate a union inside a struct from c++ to python with SIP?

I answered this question explaining how to translate a union from c++ to python with SIP (unions are not automatically supported). When I use this type of wrapping for a union inside an existing struct I get the following error message when I try to…
0
votes
1 answer

How to handle a union in python-sip?

I'm using SIP version 5.4.0 and have no trouble translating a struct in c++ for python3.8. When I want to translate a union sip-install gives me a syntax error. Any ideas? Thank you for an answer. Johnny
0
votes
1 answer

Why does sip complain about unexpected type 'str' when using a char *?

I am trying to use sip to create python bindings from c++ to python 3.8. I found a simple example here and updated it to get it working with sip version 5.4 which I installed with pip. Details can be found here I changed the names from word to…
0
votes
4 answers

Unable to launch Spyder after installation of PyQt5

On installation of PyQt5 i'm unable to launch Spyder on Windows. When i tried to launch through the conda prompt, i get the following error, File "C:\Users\sarshetty\Anaconda3\lib\site-packages\qtpy\__init__.py", line 132, in from…
sarvotham
  • 11
  • 2
  • 3
0
votes
0 answers

how do you install a zip (or tag.gz) file in an anaconda prompt with Python 2.7 (I want to install a version of PyQt4)

I have downloaded Anaconda 64 bit with Python 2.7 on my compter which works with Windows. I also downloaded PyQt4 version 4.11.4. However, when I run my code, I have this : RuntimeError: the sip module implements API v9.0 to v9.2 but the PyQt4.QtGui…
Marie
  • 1
  • 1
0
votes
0 answers

ImportError: /tmp/_MEIpePG2T/PyQt5/sip.so: undefined symbol: PySlice_Unpack in create exe file using PyInstaller

I have a problem with converting my scripts into one exe file. I used module PyQt5 and my custom modules. Can anyone help me to solve this problem and create exe file? It's important to mention that I have venv but I couldn't match its libs to my…
0
votes
0 answers

How can I install sip(4.19.19) for pyqt4?

I'm sorry to ask such a question... I want to install sip4(4.19.19) for PyQt4 in windows 10. But I've already found this articles How to navigate to a directory in C:\ with…
0
votes
1 answer

How to install QCustomPlot for PyQt5 on Arch Linux

I want to use QCustomPlot with PyQt5 on Arch Linux but I'm having trouble installing it. I already installed the sip package but the setup fails with the following error: ModuleNotFoundError: No module named 'sipdistutils' Link to repo:…
johnson
  • 3,729
  • 3
  • 31
  • 32
0
votes
1 answer

Python SIP expose function

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:…
Giacomo
  • 412
  • 3
  • 10
0
votes
1 answer

Installing SIP and PyQt3

I want to install PyQt3 because pip gives me an error I tried to install it manually. First I need to install sip (to get sipconfig module) when I tried make I get error: siplib.c: In function ‘raiseNoWChar’: siplib.c:10816: error:…
J91321
  • 437
  • 1
  • 5
  • 9
0
votes
1 answer

Python-SIP not converting signal parameters for custom types

Background In a style not dissimilar to PyQt, SIP is used to generate native bindings for a custom library that is based on Qt (Source). I am trying to diagnose an issue relating to signals that provide parameters for custom types not being…
blockchaindev
  • 3,134
  • 3
  • 22
  • 30
0
votes
1 answer

Cygwin Make Just Keeps Entering Directory when making sip package

I am trying to install sip as per the instructions here. I've installed Cygwin to allow me to use the make command in Windows (I'm using Windows 10). I run the configure.py file, and this creates a Makefile. I then run make from the Cygwin terminal,…
PProteus
  • 549
  • 1
  • 10
  • 23
0
votes
2 answers

How can SIP handle a C++ method that returns int*

I'm trying to make a C++ library available as a Python module. It seems SIP is the best tool for the job. (If wrong, please correct me.) One class looks like the programmer was trying to get around c's lack of dynamic typing: class Item{ …
Jeff Guy
  • 157
  • 1
  • 9
0
votes
0 answers

private copy of sip module for pyqt installation

I am facing problem when I try to install PyQt(according to the following link https://www.metachris.com/2016/03/how-to-install-qt56-pyqt5-virtualenv-python3/). I am able to install everything but got stuck for PyQt installation.For installation it…