如何在python 3.7上安装pyscard
?
python 3.7中是否还有其他用于智能读卡器的模块?
之后的错误:
pip install pyscard
:
ERROR: Command errored out with exit status 1:
command: 'c:allinoneportableappspython374python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\E4B6~1\AppData\Local\Temp\pip-install-rgx51osl\pyscard\setup.py'"'"'; __file__='"'"'C:\Users\E4B6~1\AppData\Local\Temp\pip-install-rgx51osl\pyscard\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersE4B6~1AppDataLocalTemppip-record-o8_63h_7install-record.txt' --single-version-externally-managed --compile
cwd: C:UsersE4B6~1AppDataLocalTemppip-install-rgx51oslpyscard
Complete output (8 lines):
running install
running build
running build_py
running build_ext
building 'smartcard.scard._scard' extension
swigging smartcard/scard/scard.i to smartcard/scard/scard_wrap.c
swig.exe -python -outdir smartcard/scard -DWIN32 -o smartcard/scard/scard_wrap.c smartcard/scard/scard.i
error: command 'swig.exe' failed: No such file or directory
ERROR: Command errored out with exit status 1: 'c:allinoneportableappspython374python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\E4B6~1\AppData\Local\Temp\pip-install-rgx51osl\pyscard\setup.py'"'"'; __file__='"'"'C:\Users\E4B6~1\AppData\Local\Temp\pip-install-rgx51osl\pyscard\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersE4B6~1AppDataLocalTemppip-record-o8_63h_7install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
下载swig最新版本。将其解压缩到类似C:pythonSwig
的文件夹中,然后将该文件夹添加到您的PATH
中。如果您没有,请从Microsoft下载并安装VCPP express。然后尝试:
pip install pyscard
只需下载http://www.swig.org/download.html
SWIG是一个接口编译器,它将用C和C++编写的程序与Perl、Python、Ruby 等脚本语言连接起来