在pedora28上使用pip3进行pyscard安装失败

时间:2020-01-30 21:56:37

标签: python pip

enter image description here我正在Fedora28上安装pyscard,请参见下面的内容; 错误如何解决?

(venv) [root@ibm044 venv]# pip3 install pyscard
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
Collecting pyscard
  Using cached https://files.pythonhosted.org/packages/ed/dd/c575bb75122c250cbed3f70440cb8e25582bf991855bb4eb27371fb8d962/pyscard-1.9.9.tar.gz
Installing collected packages: pyscard
  Running setup.py install for pyscard ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-a3yr3q9p/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 /tmp/pip-a1udmk70-record/install-record.txt --single-version-externally-managed --compile:
    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 -python -outdir smartcard/scard -DPCSCLITE -o smartcard/scard/scard_wrap.c smartcard/scard/scard.i
    creating build
    creating build/temp.linux-x86_64-3.6
    creating build/temp.linux-x86_64-3.6/smartcard
    creating build/temp.linux-x86_64-3.6/smartcard/scard
    gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DVER_PRODUCTVERSION=1,9,9,0000 -DVER_PRODUCTVERSION_STR=1.9.9 -DPCSCLITE=1 -Ismartcard/scard/ -I/usr/include/PCSC -I/usr/local/include/PCSC -I/usr/include/python3.6m -c smartcard/scard/helpers.c -o build/temp.linux-x86_64-3.6/smartcard/scard/helpers.o
    smartcard/scard/helpers.c:28:10: fatal error: winscard.h: No such file or directory
     #include <winscard.h>
              ^~~~~~~~~~~~
    compilation terminated.
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-a3yr3q9p/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 /tmp/pip-a1udmk70-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-a3yr3q9p/pyscard/

0 个答案:

没有答案
相关问题