Installing the Chilkat2 Python Module on macOS
How to add the Chilkat2 module to a Python installation on macOS (Apple Silicon and Intel), plus the checks that prevent the common version, architecture, and Gatekeeper errors.
Examples: Chilkat2 Python Examples · Documentation: Chilkat2 Python Reference
pip3 install chilkat2The steps below are for a manual install from the downloaded
.tar.gz.
- Python version — e.g. the 3.14 download for Python 3.14.
- Architecture —
arm64for Apple Silicon,x86_64for Intel. Note: on Apple Silicon a Python can run under Rosetta asx86_64— match the download to what Python actually reports (Step 3), not to the Mac's chip.
installChilkat.py verifies version, OS, and architecture for you.
-
Download & unpack
Get the build for your Mac from the Chilkat2 macOS Python Downloads, then unpack:
tar xzf chilkat2-python-<version>-<arch>-macosx.tar.gz
If the browser already decompressed it to a
.tar, usetar xf chilkat2-python-<version>-<arch>-macosx.tarinstead. -
What's in the download
chilkat2-python-<version>-<arch>-macosx/ ├─ chilkat2.so the compiled Chilkat2 module ├─ installChilkat.py copies chilkat2.so into site-packages ├─ testChilkat.py verifies the install ├─ license.pdf ├─ pcre2-license.pdf ├─ quickjs-license.pdf ├─ THIRD-PARTY-NOTICES.txt ├─ Darwin empty marker: target operating system (macOS) ├─ x86_64 empty marker: target architecture └─ 3.14 empty marker: target Python version
The three empty marker files identify the OS, architecture, and Python version this download is built for.
installChilkat.pyreads them to confirm the download matches your Python before installing. -
Check your Python version and architecture
python3 --version python3 -c "import platform; print(platform.machine())" # arm64 or x86_64Match the version to the download's marker (e.g.
3.14) and the architecture toplatform.machine().With multiple Pythons or a virtual environment, run the install and test with the exact interpreter you'll use. -
Install into site-packages
From the unpacked directory:
python3 installChilkat.py # per-user site-packages sudo python3 installChilkat.py -g # global site-packages
The script prints the detected Python version, system, and processor, refuses to install if the download doesn't match, then copies
chilkat2.sointosite-packages. -
Verify with testChilkat.py
python3 testChilkat.py
It imports
chilkat2and prints the version of several classes:Zip: 11.5.0 IMAP: 11.5.0 FTP: 11.5.0 POP3/SMTP: 11.5.0 ... (one line per class) -
Use Chilkat in your scripts
Import
chilkat2and unlock once at startup (any string starts the 30-day trial; use your license code after purchase):import chilkat2 glob = chilkat2.Global() success = glob.UnlockBundle("Anything for 30-day trial") if success != True: print(glob.LastErrorText) # ... use any Chilkat class, e.g. chilkat2.Http(), chilkat2.JsonObject(), ...
macOS Gatekeeper: clear the quarantine
A downloaded .so carries a quarantine attribute that macOS may block, so
the import fails with a code-signature / “cannot be opened” error. Clear it from
the unpacked folder before installing:
xattr -dr com.apple.quarantine chilkat2-python-<version>-<arch>-macosx
Common errors
“This Python version does not match the downloaded Chilkat module”
installChilkat.py found that your Python version differs from the download
(the version marker file). Download the build matching python3 --version.
“ImportError” when importing chilkat2
Usually an architecture mismatch — an arm64 module under an
x86_64 (Rosetta) Python, or the reverse. Re-check Step 3 with
platform.machine() and use the matching download. If macOS blocks the file
with a code-signature error, clear the Gatekeeper quarantine (above).
“ModuleNotFoundError: No module named 'chilkat2'”
The module was installed into a different Python (or outside your virtual environment)
than the one running your script. Install and run with the same interpreter, or use
pip3 install chilkat2.