我的脚本开始如下:
from smartcard.Exceptions import NoCardException
from smartcard.System import readers
from smartcard.util import toHexString
我一直使用spyder进行开发,脚本运行良好。
当我尝试在 hyper 命令行运行时,我得到以下信息:
\smart.py", line 16, in <module>
from smartcard.Exceptions import NoCardException
ModuleNotFoundError: No module named 'smartcard'
当我检查是否安装了 pyscard 时,我得到以下信息:
$ pip install pyscard
Requirement already satisfied: pyscard in c:\python311\lib\site-packages (2.0.10)
pyscard如何安装而执行时不安装?
将 Python 3.11 降级到 Python 3.8,就可以了。这是您面临的依赖问题,请确保您升级了您的 pip,伙计。