LudovicRousseau / pyscard

pyscard smartcard library for python
http://pyscard.sourceforge.net/
GNU Lesser General Public License v2.1
379 stars 108 forks source link

"""command 'swig' failed with exit status 1""" but I already installed the swig #81

Closed bahadiryildirim closed 4 years ago

bahadiryildirim commented 4 years ago

Hello LudovicRousseau; Firstly thank you for the librarys. I get a few errors when using our libraries. Can you help me please?

That the swig is installed:

pi@raspberrypi:~ $ swig -version

SWIG Version 4.0.1

Compiled with g++ [armv7l-unknown-linux-gnueabihf]

Configured options: +pcre

Please see http://www.swig.org for reporting bugs and further information

This is the error I get when installing pyscard

pi@raspberrypi:~ $ sudo pip3 install pyscard
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pyscard
  Using cached https://files.pythonhosted.org/packages/ed/dd/c575bb75122c250cbed3f70440cb8e25582bf991855bb4eb27371fb8d962/pyscard-1.9.9.tar.gz
Building wheels for collected packages: pyscard
  Running setup.py bdist_wheel for pyscard ... error
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-o9nfmzk6/pyscard/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-ep3bpr1_ --python-tag cp37:
  running bdist_wheel
  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
  unable to execute 'swig': No such file or directory
  error: command 'swig' failed with exit status 1

  ----------------------------------------
  Failed building wheel for pyscard
  Running setup.py clean for pyscard
Failed to build pyscard
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-install-o9nfmzk6/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-record-yzbtba4b/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
    unable to execute 'swig': No such file or directory
    error: command 'swig' failed with exit status 1

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

I would like to ask you another question that is not directly related to this topic. Also I can't use ./configure command when installing PCSC lite because there is no configure file.

LudovicRousseau commented 4 years ago

It looks like swig is not installed correctly:

unable to execute 'swig': No such file or directory
bahadiryildirim commented 4 years ago

can you answer my question about PCSClite?

bahadiryildirim commented 4 years ago

and I can use swig in other modules. I'm just getting this error here.

LudovicRousseau commented 4 years ago

Get the pcsc-lite archive from https://pcsclite.apdu.fr/files/

I can't help for swig. You have to debug on your side.