Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there anyway to install twain module in python 3

I want to install the Python TWAIN module in Python 3. But in the docs it says:

Python versions 2.1 through 2.5 are supported.

Can I convert it using 2to3?

like image 984
Cahit Yıldırım Avatar asked Jan 26 '26 00:01

Cahit Yıldırım


1 Answers

You can install twain for Python 3 using the .whl method.

First, you need to download the .whl file: twainmodule - Python Extension Packages for Windows. Pick the one that matches your Python 3 version (example: I downloaded the twain‑1.0.4‑cp38‑cp38‑win32.whl).

Important note, I specifically chose the file ending with win32.whl because I had troubles using the 64-bit version. For example, the scaner I was working with only supported 32-bit Twain.

Then, install wheel with pip install wheel.

Install twain using pip install /path/to/twain‑1.0.4‑cpXX‑cpXX‑XX.whl

like image 116
martin tan Avatar answered Jan 28 '26 16:01

martin tan