Installing the Chilkat2 Python Module on Windows
How to add the Chilkat2 module to a Windows Python installation, plus the checks that prevent the common version/architecture errors.
Examples: Chilkat2 Python Examples · Documentation: Chilkat2 Python Reference
pip install chilkat2The steps below are for a manual install from the downloaded
.zip.
.pyd) only imports into a Python that matches it:
- Python version — e.g. the 3.14 download for Python 3.14.
- Architecture — 64-bit Python needs the x64 download; 32-bit Python needs the win32 download (Python can run 32-bit even on 64-bit Windows).
installChilkat.py verifies this for you (see Step 3).
-
Download
Get the build for your Python from the Chilkat2 Windows Python Downloads, and unzip it to any directory.
-
What's in the download
chilkat2-python-<version>-<arch>/ ├─ chilkat2.pyd the compiled Chilkat2 module ├─ installChilkat.py copies chilkat2.pyd into site-packages ├─ testChilkat.py verifies the install ├─ zipTest.py a small example ├─ Install_Instructions.txt ├─ license.pdf ├─ pcre2-license.pdf ├─ quickjs-license.pdf ├─ Windows empty marker: target operating system ├─ 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
python --version python -c "import platform; print(platform.architecture()[0])"
Match the version to the download's marker (e.g.
3.14), and use the x64 download for64bitor the win32 download for32bit.If you have more than one Python installed, run these (and the install below) with the exact Python you intend to use — for example via the launcher:py -3.14 .... -
Install into site-packages
Open a PowerShell or Command Prompt in the unzipped directory and run:
python installChilkat.py # per-user site-packages python installChilkat.py -g # global site-packages (may need admin)
The script first prints the detected Python version, system, and processor, and refuses to install if the download doesn't match — then it copies
chilkat2.pydinto the appropriatesite-packagesdirectory. -
Verify with testChilkat.py
python 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)If versions print, the module imported successfully.
-
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(), ...
Common errors
“This Python version does not match the downloaded Chilkat module”
installChilkat.py detected that your Python version differs from the
download (the version marker file). Download the build matching
python --version.
“ImportError: DLL load failed while importing chilkat2”
Almost always an architecture or version mismatch — a 64-bit .pyd
under 32-bit Python (or the reverse), or a .pyd built for a different Python
version. Re-check Step 3 and install the matching download.
“ModuleNotFoundError: No module named 'chilkat2'”
The module was installed into a different Python than the one running your script.
Install and run with the same interpreter (use py -3.x to be explicit), or
simply use pip install chilkat2.
32-bit vs 64-bit confusion
Python can run as a 32-bit process even on 64-bit Windows. Always confirm with
python -c "import platform; print(platform.architecture()[0])" and pick the
matching download (win32 vs x64).