Install Pyscard in python 3.7

7k views Asked by At

How to install pyscard on python 3.7?

Are there other modules for smart card readers in python 3.7?

the error after:

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.

2

There are 2 answers

0
maimornaja On

just download http://www.swig.org/download.html

SWIG is an interface compiler that connects programs written in C and C++ with scripting languages such as Perl, Python, Ruby

0
Paolo Bellamoli On

Download swig, latest version. Unzip it in a folder like C:\python\Swig and add that folder to your PATH. Download and install VCPP express from Microsoft, if you don't have. Then try :

pip install pyscard