如何在Python3.7上安装pyscard?
Python3.7中是否还有其他用于智能卡读卡器的模块?
下面的错误:
pip install pyscard
ERROR: Command errored out with exit status 1:
command: 'c:\allinone\portableapps\python374\python.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('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\E4B6~1\AppData\Local\Temp\pip-record-o8_63h_7\install-record.txt' --single-version-externally-managed --compile
cwd: C:\Users\E4B6~1\AppData\Local\Temp\pip-install-rgx51osl\pyscard\
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:\allinone\portableapps\python374\python.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('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\E4B6~1\AppData\Local\Temp\pip-record-o8_63h_7\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.发布于 2021-03-14 01:11:10
下载swig,最新版本。将其解压到C:\python\Swig这样的文件夹中,并将该文件夹添加到PATH中。如果您还没有,请从Microsoft下载并安装VCPP express。然后尝试:
pip install pyscard发布于 2020-07-20 15:55:42
只需下载http://www.swig.org/download.html
SWIG是一个接口编译器,它将用C和C++编写的程序与脚本语言连接起来
https://stackoverflow.com/questions/58714774
复制相似问题