【问题标题】:Install Pyscard in python 3.7在 python 3.7 中安装 Pyscard
【发布时间】: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


【解决方案1】:

下载 swig,最新版本。 将其解压缩到C:\python\Swig 之类的文件夹中,然后将该文件夹添加到您的PATH。 如果没有,请从 Microsoft 下载并安装 VCPP express。 然后尝试:

pip install pyscard

【讨论】:

    【解决方案2】:

    只需下载 http://www.swig.org/download.html

    SWIG 是一个接口编译器,它将用 C 和 C++ 编写的程序与 Perl、Python、Ruby 等脚本语言连接起来

    【讨论】:

      猜你喜欢
      • 2020-01-22
      • 1970-01-01
      • 2018-07-27
      • 2022-11-15
      • 2021-01-09
      • 2020-05-18
      • 2021-04-13
      • 1970-01-01
      • 2022-12-15
      相关资源
      最近更新 更多