本文介绍了反正有没有在python 3中安装twain模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在Python 3中安装 Python TWAIN模块,但在文档中却说:
I want to install the Python TWAIN module in Python 3. But in the docs it says:
支持Python 2.1至2.5版本.
Python versions 2.1 through 2.5 are supported.
我可以使用2to3进行转换吗?
Can I convert it using 2to3?
推荐答案使用过去模块提供了实验性的翻译包,可帮助您在Python 3环境中导入和使用旧的Python 2模块.
Use past module which provides an experimental translation package to help with importing and using old Python 2 modules in a Python 3 environment.
因此请使用pip安装软件包
So install your package with pip
pip3 install twain --no-compile # to ignore SyntaxErrors并使用下一个代码将twain导入您的python3代码中:
And use next code to import twain in your python3 code :
from past import autotranslate autotranslate(['twain']) import twain # use twain .......更多推荐
反正有没有在python 3中安装twain模块
发布评论