smartcard - 在 python 3.7 中安装 Pyscard
问题描述
如何pyscard
在 python 3.7 上安装?
python 3.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.
解决方案
下载 swig,最新版本。将其解压缩到一个文件夹中,C:\python\Swig
然后将该文件夹添加到您的PATH
. 如果没有,请从 Microsoft 下载并安装 VCPP express。然后尝试:
pip install pyscard
推荐阅读
- redis - 在redis中按模式删除键时出错
- html - 未呈现返回语句
- android - Android BLE 有时不读取/写入任何内容,使用第三方应用程序后重新启动工作
- ansible - 如何在执行剧本时在命令行中添加多个清单文件
- bixby - 如何在 bixby 中将一个话语与两个或多个意图绑定
- automation - 批处理文件以打开 .sql 文件并“作为脚本执行”
- python - 移动到下一页使用 BeautifulSoup 进行抓取
- ios - 如何更改 AppDelegate didBecomeActive 中的视图?
- python - boost python - 提取ndarray时的nullptr
- openstreetmap - GeoTIFF 未覆盖 QGIS3 中的底图