Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6112017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:41:49+00:00 2026-05-23T14:41:49+00:00

The Problem I’m trying to build libxml ( libxml2-2.7.8 ) bindings for Python 3.2.

  • 0

The Problem

I’m trying to build libxml (libxml2-2.7.8) bindings for Python 3.2. When I run the following:

./configure --with-python=/usr/bin/python3.2

The compilation of libxml2-2.7.8 works…but the Python bindings for libxml2-2.7.8 don’t!

Attempted Fixes

  1. Ported setup.py and generator.py (using 2to3, and some basic patches on generator.py)
  2. Patched libxml.c and types.c as follows:
    • replace PyInt* by PyLong*
    • replace PyString* by PyBytes*

Current Situation

Unfortunately, it still wasn’t enough. I ran python3.2 setup.py build and got the following error:

types.c:594:17: error: ‘PyInstanceObject’ undeclared (first use in this function)

I can’t find the Python3 equivalent of PyInstanceObject!

Has anyone managed to compile libxml2 bindings for Python 3?

Did I miss something??? Can anybody help? 🙁

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T14:41:50+00:00Added an answer on May 23, 2026 at 2:41 pm

    The PyInstanceObject is a part of the support for old style types, which is gone in Python 3, and has been deprecated since Python 2.2. The trick here is to first update the bindings to use new-style classes, and then port to Python 3.

    (Or use lxml, which wraps the libxml2 in a Pythonic XML classes).

    I’m not 100% sure what the replacement is, I’ve never done old-style classes in C, but I think it’s simply a PyObject.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to build out a mysql database design for a project. The problem
I'm trying to build my first generic list and have run into some problems.
I have run into a problem trying to modify a form I myself have
I am trying build a DataTable one row at a time using the following
i am trying to build a network simulation with OMNet++. Problem is i dont
I am trying to build my first chrome extension, I have a problem where
I'm trying to build small web-system (url shortcutting) using nonsql Cassandra DB, the problem
I am trying to build small logger library. I am facig some problem with
Hey everyone, I am having a problem with a website I'm trying to build;
I'm trying to build a blog app and the problem is when I use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.