【发布时间】:2020-03-02 00:42:35
【问题描述】:
如何在 python 3.7 上安装pyscard?
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.
【问题讨论】:
-
你试过什么?你到底在哪里失败了?
-
我在尝试进行 pip 安装时失败了。而且我没有找到如何在 python 3.7 上安装
-
所以你已经在控制台中运行了
pip install pyscard。错误是什么? -
我把它添加到上面的问题中
-
对
swig.exe的引用可能是this。也就是说,我不知道这个包,我不使用 Windows,所以帮不上什么忙!
标签: smartcard smartcard-reader python-3.7 pyscard