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 7964263
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:50:28+00:00 2026-06-04T05:50:28+00:00

I trying to make minimal part of Python to work as part (static library)

  • 0

I trying to make minimal part of Python to work as part (static library) of my iOS application for internal scripting. I used configure under Mac OS X(10.7) and it was successful. Then I got compilable and linkable XCode project very fast.
The problem is, when I trying to use Python by

Py_NoSiteFlag=1;
Py_Initialize();

it fails with error “Fatal Python error: exceptions bootstrapping error.” inside _PyExc_Init().
I tried to debug it, but unfortunately I cant understand why it fails. May be bacause I noob in Python source, but anyway, I need to port it. Tried 2.7.3, or 3.2.3, it was the same result as above. Any solution or hint will be very helpful.

Call stack:

#0        0x300cba1c in __pthread_kill ()
#1        0x362e43ba in pthread_kill ()
#2        0x362dcbfe in abort ()
#3        0x00127d96 in Py_FatalError at /Users/mac_user/Downloads/Python-3.2.3/IOS/pythoncore/../../Python/pythonrun.c:2169
#4        0x00155328 in _PyExc_Init at /Users/mac_user/Downloads/Python-3.2.3/IOS/pythoncore/../../Objects/exceptions.c:2042
#5        0x00127ad4 in Py_InitializeEx at /Users/mac_user/Downloads/Python-3.2.3/IOS/pythoncore/../../Python/pythonrun.c:272
#6        0x0012846a in Py_Initialize at /Users/mac_user/Downloads/Python-3.2.3/IOS/pythoncore/../../Python/pythonrun.c:332
#7        0x000d6242 in testpython at /Users/mac_user/Downloads/Python-3.2.3/IOS/test/test/testmac.c:15
#8        0x000d618e in -[ViewController viewDidLoad] at /Users/mac_user/Downloads/Python-3.2.3/IOS/test/test/ViewController.m:23
#9        0x3283ff0e in -[UIViewController view] ()
#10        0x3283e2b4 in -[UIWindow addRootViewControllerViewIfPossible] ()
#11        0x3283a332 in -[UIWindow _setHidden:forced:] ()
#12        0x3283e28e in -[UIWindow _orderFrontWithoutMakingKey] ()
#13        0x3284cc60 in -[UIWindow makeKeyAndVisible] ()
#14        0x000d5ffe in -[AppDelegate application:didFinishLaunchingWithOptions:] at /Users/mac_user/Downloads/Python-3.2.3/IOS/test/test/AppDelegate.m:35
#15        0x3283e820 in -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] ()
#16        0x32838b64 in -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] ()
#17        0x3280d7d6 in -[UIApplication handleEvent:withNewEvent:] ()
#18        0x3280d214 in -[UIApplication sendEvent:] ()
#19        0x3280cc52 in _UIApplicationHandleEvent ()
#20        0x322b7e76 in PurpleEventCallback ()
#21        0x3113ba96 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ ()
#22        0x3113d83e in __CFRunLoopDoSource1 ()
  • 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-06-04T05:50:29+00:00Added an answer on June 4, 2026 at 5:50 am

    Two thoughts:

    1. The error you’re getting is from a failing to import builtins module.

      From http://hg.python.org/releasing/3.2.3/file/86d1421a552c/Objects/exceptions.c

      2040     bltinmod = PyImport_ImportModule("builtins");   
      2041     if (bltinmod == NULL)
      2042         Py_FatalError("exceptions bootstrapping error.");
      

      You can follow the code up from there, and there are lots of reasons why
      this import could fail. If you want to know what’s actually wrong, you’ll
      need to step through it.

    2. Or, you could check this out:

      https://github.com/cobbal/python-for-iphone

      “Build script for compiling python into a static library that can be used with the official SDK”

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

Sidebar

Related Questions

Trying to make simple minesweeper game in python, but have one problem. I have
im trying make one replace in string from a array but this dont work
I'm trying make a static text which if too long for the sizer, will
I'm trying to make a layout in which total minimal height would be 100%
I am trying make such application which speak automatically when the image loaded it
I am trying to make Erlang's Inets mode_esi work and run some function. So,
I am trying to make application window with movable separator between left and right
I have a situation that I'm trying to make work with an array ,
I'm trying to make a minimal implementation of TinyMCE. The only buttons I want
I am trying make long screen to vertical direction. So, I need a screen

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.