Python is a framework on Mac OS X so you need to,
#include <Python/Python.h>
You also need to call gcc
with the -framework
argument to actually do anything inside C,
gcc -shared -o sample.so sample.c -framework Python
More Related Contents:
- Cannot install Lxml on Mac OS X 10.9
- Python: MySQLdb and “Library not loaded: libmysqlclient.16.dylib”
- ImportError: No module named Foundation
- Why is my PyGame application not running at all?
- Paramiko “Unknown Server”
- How to change default Python version?
- How to install PIL with pip on Mac OS?
- Installation Issue with matplotlib Python [duplicate]
- How to install MySQLdb (Python data access library to MySQL) on Mac OS X?
- pip or pip3 to install packages for Python 3?
- python location on mac osx
- Matplotlib issue on OS X (“ImportError: cannot import name _thread”)
- Segmentation fault: 11 in OS X
- FileNotFoundError: [Errno 2] No such file or directory: ‘geckodriver’: ‘geckodriver’ with GeckoDriver and Python in MAC OS
- Can’t install psycopg2 package through pip install on MacOS
- How can I programmatically change the background in Mac OS X?
- Can’t install pygame with pip as there is an error whilst runningvsetup.py bdist_wheel for pygame [duplicate]
- How do you see the entire command history in interactive Python?
- Find out if/which BLAS library is used by Numpy
- How can I install multiple versions of Python on latest OS X and use them in parallel?
- Unable to import opengl.gl in python on macos
- How to find pg_config path
- env: python\r: No such file or directory
- Big Sur clang “invalid version” error due to MACOSX_DEPLOYMENT_TARGET
- Python: ImportError: lxml not found, please install it
- Trouble Installing Pygame on Mac OSX
- Segmentation Fault using Python Shared Memory
- How can I fix the “zsh: command not found: python” error? (macOS Monterey 12.3, Python 3.10, Atom IDE, and atom-python-run 0.9.7)
- Unable to install tkinter with pyenv Pythons on MacOS
- Change title of Tkinter application in OS X Menu Bar