Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
46 views

I am trying to build a Python extension (module) with D and the pyd (https://github.com/ariovistus/pyd) and dub and ldc2 compiler on Windows. I have the following dub.sdl: name "hello" ...
Sam Saint-Pettersen's user avatar
1 vote
0 answers
61 views

We're developing a VSCode extension that works with Jupyter notebooks and need to run integration tests in CI/CD. The main issue is that when running integration tests, VSCode prompts the user to ...
Aurelien Bloch's user avatar
0 votes
0 answers
82 views

I have an MkDocs site with the pymdownx.keys plugin. The plugin includes formatting for a number of keys along with unicode characters: When I try to convert the page to PDF using Weasyprint, the ...
jeremywat's user avatar
  • 1,126
0 votes
1 answer
216 views

I'm puzzled by the following issue. I have a Mac M3 with the following characteristics. I have Python 3.12.6. I have been trying to install pyo (https://pypi.org/project/pyo/1.0.1/). After many ...
Nisanio's user avatar
0 votes
0 answers
73 views

A python C++ extension has the following structure: /myextension |_____basecode | |__header.h | |__functions.cpp | |_____utilities | |______utilities.h | |...
subhacom's user avatar
  • 919
1 vote
0 answers
243 views

I am using PyO3 (v0.22.2) / Rust to write something a little similar to defaultdict, but with an integer default rather than a callback: >>> from my_package.pyo3_ext import PyDefaultDict >...
davidA's user avatar
  • 13.9k
0 votes
0 answers
32 views

I am working on PYCharm IDE application for getting address from latitude and longitude and I have also installed phonenumber and geocoder library to the project in PYCharm IDE but unfortunately ...
user2741987's user avatar
1 vote
0 answers
35 views

I have written a Python extension in C/C++ to wrap my code for Python. I followed CPython documentation in the parts of C/C++ functions each module should provide For example, my module contains: /* ...
girl_coding's user avatar
2 votes
0 answers
47 views

Some Python objects - for example, instances of int, float and dict - use a free list to speed up allocations. The C API provides methods to clear such free lists. By hardcoding PyXXX_ClearFreeList ...
Suen's user avatar
  • 103
0 votes
0 answers
263 views

I recently found that I could get the Python interpreter state by PyInterpreterState_Get() C-API. However, when I tried to access its members defined by struct _is in the extension code, during the ...
Natarich J's user avatar
0 votes
1 answer
84 views

In Python, I have a pair of classes like class Internal: def __init__(self, ref): self.ref = ref class External: def __init__(self): self.storage = [1,2,3] self.int = ...
Askold Ilvento's user avatar
2 votes
1 answer
150 views

I have been struggling to understand what I am doing wrong with the memory management of this this C++ function for a python module, but I don't have much experience in this regard. Every time I run ...
van's user avatar
  • 37
3 votes
0 answers
525 views

I have created a Python project with a C++ extension using pyproject.toml (PEP 518, PEP 517, PEP 621, PEP 660, etc.). I'm sure I could be doing some things better, but generally speaking it's working ...
Nick Williams's user avatar
1 vote
1 answer
440 views

Used pybind11 in the past without issue pulled in as a submodule and used via cmake. Now working on another project that uses poetry, and so wanted to make everything poetry-centric. Trying to build ...
learnvst's user avatar
  • 16.3k
2 votes
2 answers
10k views

Every time I launch VS code, the Pylance server crashes 5 times in in 3 minutes, or so the output terminal says. The server stops trying to relaunch and I lose out on a handful of features as a result....
ADH's user avatar
  • 21
0 votes
0 answers
459 views

So I was trying to learn ROS2 iron on the Ubuntu Server. I installed the Ubuntu server on a Raspberry Pi 4 and I used my laptop to SSH into the Raspberry Pi 4. Next, I installed ROS2 iron on the ...
Navid Moghtaderi's user avatar
0 votes
0 answers
205 views

Using VSCode (which I'm quite new to) on Ubuntu 20.04, I wish to build a C-extension (actually C++ extension) to Python. I'm trying to build the following MWE: #include <numpy/arrayobject.h> int ...
EZLearner's user avatar
  • 1,864
0 votes
1 answer
1k views

When building a wheel of a Python extension module, how can I tell setup() to use an existing/precompiled shared library? For awful horrible reasons, the SO/DLL has to be compiled by a build system ...
alexchandel's user avatar
3 votes
6 answers
43k views

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for insightface Failed to build insightface ERROR: Could not build wheels for ...
kin's user avatar
  • 31
0 votes
1 answer
620 views

I have a python package (my_python_package), part of which is a C++ extension (my_ext) with a single function (my_ext_func). The extension depends on my C++ library (libmycpp) and my C++ library ...
Jerome D Walker's user avatar
0 votes
0 answers
61 views

Let's take this as an example: reference The definition of the type _PyCFunctionFastWithKeywords is: PyObject *_PyCFunctionFastWithKeywords(PyObject *self, ...
Jim's user avatar
  • 841
1 vote
0 answers
18 views

I have been attempting web scraping, but I encountered an error that states, "We're sorry but default doesn't work properly without JavaScript enabled. Please enable it to continue." I have ...
shubh jain's user avatar
2 votes
1 answer
1k views

I wish to use some C and CUDA code in my Python package (which I then call using ctypes). Because of the CUDA, it doesn't seem to be easy to use the traditional approach of a setuptools Extension, so ...
user3708067's user avatar
0 votes
1 answer
248 views

I have a simple project directory and some simple files which failed to compile. Directory structure: cythonize: ROOT |___ cythonize |___ __init__.pxd |___ __init__.py |___ first.pxd |...
Jim's user avatar
  • 841
3 votes
1 answer
2k views

I am trying to build a 'C' python extension on Windows, the core C code compiles absolutely fine, but I am unable to build the python module using setuptool as I am getting mandlebrot.c(36): fatal ...
Swatcat's user avatar
  • 75
-1 votes
1 answer
901 views

This extension is used to search data in a linked list and return it as a nested tuple of lists.[(ele1,ele2,),...] However when the program runs for a period of time, segment fault will occur. I know ...
the  drugs don't work's user avatar
5 votes
5 answers
2k views

I'm creating a C++ extension for python. It creates a module parent that contains a sub-module child. The child has one method hello(). It works fine if I call it as import parent parent.child.hello() ...
BlacKow's user avatar
  • 316
0 votes
1 answer
322 views

Question How do I write a wrapper script for VTune for Windows? The documentation provides a simple wrapper script example for bash: #!/bin/bash # Prefix script echo "Target process PID: $...
Samufi's user avatar
  • 2,740
0 votes
1 answer
2k views

I am trying to understand what happens / is supposed to happen when I attach to a process with a debugger in VS Code. I understand that I can create attach launch configurations in VS Code, and when I ...
Samufi's user avatar
  • 2,740
0 votes
0 answers
71 views

I'm writing a C extension for Python and need to pass the size of a C type to the compilation. So I'll want to do extra_compile_args = ['-DSIZEOF_MYTYPE=32'] in my setup.py. My question is: how can ...
jjg's user avatar
  • 1,120
1 vote
0 answers
584 views

I ssh the server in VS code and when I install python extension in the VScode, I got "Error: unable to get local issuer certificate". May I know how can I install python extension in the ...
Susan's user avatar
  • 539
1 vote
1 answer
299 views

I am writing a VS Code extension that depends on the currently set Python interpreter. When I change the Python Interpreter via the VS Code UI, the extension needs to refresh and get the latest Python ...
Bernhard's user avatar
0 votes
1 answer
40 views

I'm troubleshooting an issue with VSCode's Python extension trying to load the wrong version of Python. I'd like to know how this extension uses the Path variables you give it in its settings. For ...
Connor's user avatar
  • 1,146
1 vote
1 answer
185 views

I'm trying to troubleshoot an issue with VSCode's Python extension loading the wrong version of Python and I'd like to rule out incorrect environment variables being an issue. In the Python Extension'...
Connor's user avatar
  • 1,146
0 votes
0 answers
93 views

I am trying to import an extension module contained inside a nested package. For the purposes of this example, it's the only element of the root module, but the real case has others. When I attempt to ...
Vagrant Nexus's user avatar
0 votes
1 answer
170 views

I have created a python extension with C++. Generally, it works fine, and I can use the extension from Python to call C++ functions. When I define a method using the METH_O or METH_NOARGS macros, ...
Guitar Man's user avatar
1 vote
1 answer
155 views

I am trying to write a C++ extension with support for CPython and PyPy. My extension involves creating some custom types that support the call interface. However, I appear to be getting memory leaks ...
Lalaland's user avatar
  • 147
17 votes
6 answers
24k views

I may have messed up some environmental path variables. I was tinkering around VS Code while learning about Django and virtual environments, and changing the directory path of my Python install. While ...
Nikola da Vinci's user avatar
1 vote
1 answer
206 views

I managed to wrap kvsWebRTCClientViewer in a python C extension and I also managed to expose frame data to python via callback function as bytes array but I don't understand how to convert these ...
Farooq Zaman's user avatar
0 votes
0 answers
75 views

I have a python library that I'm trying to package into something pip-installable. It depends upon a C library (shoco). I'd like to avoid packaging the actual source code to shoco in my own package if ...
Mala's user avatar
  • 15k
3 votes
3 answers
24k views

This is my first time installing and using VSCode, and when I try to install a python extension inside a VSCode application I get the error "Error While fetching extension. XHR failed" . How ...
DonnyDongoran's user avatar
1 vote
1 answer
1k views

The following C or C++ code, intended for use in a Python extension module, defines a function f that returns a NumPy array. #include <Python.h> #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION ...
Joachim W's user avatar
  • 8,457
2 votes
0 answers
155 views

Suppose I have a class: class RawMessage(NamedTuple): data: Dict timestamp: float ... The keys and values in this dictionary are probably all integers, but I don't want to state that with ...
awy's user avatar
  • 43
0 votes
0 answers
520 views

I'm trying to create a C++ Python extension using pybind11 and CMake, and would like to take advantage of visual studio's mixed mode debugging (see) for developing the extension. I tried following the ...
osbt1's user avatar
  • 1
1 vote
1 answer
581 views

As distutils is being removed from Python in the > 3.10 versions, and setuptools will not be added to the stdlib, I want to replace an existing setup.py recipe for building/installing a C++ library ...
andybuckley's user avatar
  • 1,141
1 vote
2 answers
1k views

I'm pretty familiar with writing C code and I'm comfortable in writing python code. I'm trying to learn how to write modules in C that can be called from Python-3.9.X on OSX 10.15.7. I've gotten a ...
irritable_phd_syndrome's user avatar
0 votes
0 answers
237 views

I'm working on a project that runs in a Python environment with numerous C extensions included that are used to interface with the software that the project runs under. Unfortunately, the ...
Maddy Guthridge's user avatar
1 vote
0 answers
87 views

I am having difficulty importing a python extension module that depends on a separate shared library that I am building via a separate build system. When I attempt to import the module, I get an ...
professional_yet_not_trackable's user avatar
1 vote
0 answers
100 views

I am using template for azure web app . net deployment. I need python extension to deploy as well after MSbuild is deployed. This script works when resource group and app service plan is new, but it ...
moeen-ud-Din's user avatar
0 votes
1 answer
1k views

I am creating a python package based on this repo. The package has few cpp files which are compiled when I build the package using setup.py and running pip install . This generates _C.cpython-36m-...
Gaurav Srivastava's user avatar

1
2 3 4 5
7