Closed quintendewilde closed 6 years ago
I did not know anaconda.
I suggest to use the python
command provided by anaconda instead of the one provided by your system. See https://conda.io/docs/user-guide/install/index.html
So do not install using sudo python setup.py install
but using something like:
/home/quinten/anaconda2/bin/python setup.py install
@BLCKPSTV Did my indications help you to fix the issue?
No, to this moment I still didn't get it to work..
I can't reproduce your problem.
I installed Miniconda for Python 2.7 using Miniconda2-latest-Linux-x86_64.sh.
Then I installed pyscard using: python ./setup.py install
running install
running bdist_egg
running egg_info
writing requirements to pyscard.egg-info/requires.txt
writing pyscard.egg-info/PKG-INFO
writing top-level names to pyscard.egg-info/top_level.txt
writing dependency_links to pyscard.egg-info/dependency_links.txt
reading manifest file 'pyscard.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pyscard.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
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-2.7
creating build/temp.linux-x86_64-2.7/smartcard
creating build/temp.linux-x86_64-2.7/smartcard/scard
gcc -pthread -B /home/lroussea/miniconda2/compiler_compat -Wl,--sysroot=/ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Wall -g -O2 -Wextra -pipe -funsigned-char -fstrict-aliasing -Wchar-subscripts -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wunused -Wuninitialized -Wpointer-arith -Wredundant-decls -Winline -Wformat -Wformat-security -Wswitch-enum -Winit-self -Wmissing-include-dirs -Wempty-body -fdiagnostics-color=auto -Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition -Wbad-function-cast -Wnested-externs -Wmissing-declarations -fPIC -DVER_PRODUCTVERSION=1,9,6,0000 -DVER_PRODUCTVERSION_STR=1.9.6 -DPCSCLITE=1 -Ismartcard/scard/ -I/usr/include/PCSC -I/home/lroussea/miniconda2/include/python2.7 -c smartcard/scard/helpers.c -o build/temp.linux-x86_64-2.7/smartcard/scard/helpers.o
gcc -pthread -B /home/lroussea/miniconda2/compiler_compat -Wl,--sysroot=/ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Wall -g -O2 -Wextra -pipe -funsigned-char -fstrict-aliasing -Wchar-subscripts -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wunused -Wuninitialized -Wpointer-arith -Wredundant-decls -Winline -Wformat -Wformat-security -Wswitch-enum -Winit-self -Wmissing-include-dirs -Wempty-body -fdiagnostics-color=auto -Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition -Wbad-function-cast -Wnested-externs -Wmissing-declarations -fPIC -DVER_PRODUCTVERSION=1,9,6,0000 -DVER_PRODUCTVERSION_STR=1.9.6 -DPCSCLITE=1 -Ismartcard/scard/ -I/usr/include/PCSC -I/home/lroussea/miniconda2/include/python2.7 -c smartcard/scard/winscarddll.c -o build/temp.linux-x86_64-2.7/smartcard/scard/winscarddll.o
gcc -pthread -B /home/lroussea/miniconda2/compiler_compat -Wl,--sysroot=/ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Wall -g -O2 -Wextra -pipe -funsigned-char -fstrict-aliasing -Wchar-subscripts -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wunused -Wuninitialized -Wpointer-arith -Wredundant-decls -Winline -Wformat -Wformat-security -Wswitch-enum -Winit-self -Wmissing-include-dirs -Wempty-body -fdiagnostics-color=auto -Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition -Wbad-function-cast -Wnested-externs -Wmissing-declarations -fPIC -DVER_PRODUCTVERSION=1,9,6,0000 -DVER_PRODUCTVERSION_STR=1.9.6 -DPCSCLITE=1 -Ismartcard/scard/ -I/usr/include/PCSC -I/home/lroussea/miniconda2/include/python2.7 -c smartcard/scard/scard_wrap.c -o build/temp.linux-x86_64-2.7/smartcard/scard/scard_wrap.o
smartcard/scard/scard_wrap.c: In function ‘SWIG_Python_NewShadowInstance’:
smartcard/scard/scard_wrap.c:2484:65: warning: declaration of ‘swig_this’ shadows a global declaration [-Wshadow]
SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
^~~~~~~~~
smartcard/scard/scard_wrap.c:2225:18: note: shadowed declaration is here
static PyObject *swig_this = NULL;
^~~~~~~~~
smartcard/scard/scard_wrap.c: In function ‘SWIG_Python_SetSwigThis’:
smartcard/scard/scard_wrap.c:2559:51: warning: declaration of ‘swig_this’ shadows a global declaration [-Wshadow]
SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
^~~~~~~~~
smartcard/scard/scard_wrap.c:2225:18: note: shadowed declaration is here
static PyObject *swig_this = NULL;
^~~~~~~~~
smartcard/scard/scard_wrap.c: In function ‘_wrap_SCardGetAttrib’:
smartcard/scard/scard_wrap.c:4067:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (-1 == arg2)
^~
smartcard/scard/scard_wrap.c: In function ‘_wrap_SCardSetAttrib’:
smartcard/scard/scard_wrap.c:4131:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (-1 == arg2)
^~
smartcard/scard/scard_wrap.c: In function ‘_wrap_SCardControl’:
smartcard/scard/scard_wrap.c:4204:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (-1 == arg2)
^~
smartcard/scard/scard_wrap.c: In function ‘_wrap_SCardConnect’:
smartcard/scard/scard_wrap.c:4371:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (-1 == arg3)
^~
smartcard/scard/scard_wrap.c:4376:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (-1 == arg4)
^~
smartcard/scard/scard_wrap.c: In function ‘_wrap_SCardDisconnect’:
smartcard/scard/scard_wrap.c:4417:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (-1 == arg2)
^~
smartcard/scard/scard_wrap.c: In function ‘_wrap_SCardEndTransaction’:
smartcard/scard/scard_wrap.c:4450:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (-1 == arg2)
^~
smartcard/scard/scard_wrap.c: In function ‘_wrap_SCardEstablishContext’:
smartcard/scard/scard_wrap.c:4481:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (-1 == arg1)
^~
smartcard/scard/scard_wrap.c: In function ‘_wrap_SCardGetStatusChange’:
smartcard/scard/scard_wrap.c:4519:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (-1 == arg2)
^~
smartcard/scard/scard_wrap.c: In function ‘_wrap_SCardReconnect’:
smartcard/scard/scard_wrap.c:4854:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (-1 == arg2)
^~
smartcard/scard/scard_wrap.c:4859:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (-1 == arg3)
^~
smartcard/scard/scard_wrap.c:4864:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (-1 == arg4)
^~
smartcard/scard/scard_wrap.c: At top level:
smartcard/scard/scard_wrap.c:3017:24: warning: no previous prototype for ‘init_scard’ [-Wmissing-prototypes]
# define SWIG_init init_scard
^
smartcard/scard/scard_wrap.c:6484:1: note: in expansion of macro ‘SWIG_init’
SWIG_init(void) {
^~~~~~~~~
smartcard/scard/scard_wrap.c: In function ‘init_scard’:
smartcard/scard/scard_wrap.c:6607:41: warning: passing argument 1 of ‘PyErr_NewException’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
PyExc_SCardError = PyErr_NewException("scard.error", NULL, NULL);
^~~~~~~~~~~~~
In file included from /home/lroussea/miniconda2/include/python2.7/Python.h:121:0,
from smartcard/scard/scard_wrap.c:149:
/home/lroussea/miniconda2/include/python2.7/pyerrors.h:224:24: note: expected ‘char *’ but argument is of type ‘const char *’
PyAPI_FUNC(PyObject *) PyErr_NewException(
^~~~~~~~~~~~~~~~~~
In file included from smartcard/scard/scard_wrap.c:3063:0:
smartcard/scard/scard_wrap.c: In function ‘_wrap_SCardGetAttrib’:
smartcard/scard/memlog.h:50:26: warning: attempt to free a non-heap object ‘temp3’ [-Wfree-nonheap-object]
#define mem_Free free
smartcard/scard/scard_wrap.c:4090:9: note: in expansion of macro ‘mem_Free’
mem_Free( arg3 );
^~~~~~~~
smartcard/scard/memlog.h:50:26: warning: attempt to free a non-heap object ‘temp3’ [-Wfree-nonheap-object]
#define mem_Free free
smartcard/scard/scard_wrap.c:4105:9: note: in expansion of macro ‘mem_Free’
mem_Free( arg3 );
^~~~~~~~
smartcard/scard/scard_wrap.c: In function ‘_wrap_SCardTransmit’:
smartcard/scard/memlog.h:50:26: warning: attempt to free a non-heap object ‘temp4’ [-Wfree-nonheap-object]
#define mem_Free free
smartcard/scard/scard_wrap.c:5107:9: note: in expansion of macro ‘mem_Free’
mem_Free( arg4 );
^~~~~~~~
smartcard/scard/memlog.h:50:26: warning: attempt to free a non-heap object ‘temp4’ [-Wfree-nonheap-object]
#define mem_Free free
smartcard/scard/scard_wrap.c:5135:9: note: in expansion of macro ‘mem_Free’
mem_Free( arg4 );
^~~~~~~~
smartcard/scard/scard_wrap.c: In function ‘_wrap_SCardStatus’:
smartcard/scard/memlog.h:50:26: warning: attempt to free a non-heap object ‘temp5’ [-Wfree-nonheap-object]
#define mem_Free free
smartcard/scard/scard_wrap.c:4995:9: note: in expansion of macro ‘mem_Free’
mem_Free( arg5 );
^~~~~~~~
smartcard/scard/memlog.h:50:26: warning: attempt to free a non-heap object ‘temp5’ [-Wfree-nonheap-object]
#define mem_Free free
smartcard/scard/scard_wrap.c:5031:9: note: in expansion of macro ‘mem_Free’
mem_Free( arg5 );
^~~~~~~~
smartcard/scard/scard_wrap.c: In function ‘_wrap_SCardListReaderGroups’:
smartcard/scard/memlog.h:50:26: warning: attempt to free a non-heap object ‘temp2’ [-Wfree-nonheap-object]
#define mem_Free free
smartcard/scard/scard_wrap.c:4792:9: note: in expansion of macro ‘mem_Free’
mem_Free( arg2 );
^~~~~~~~
smartcard/scard/memlog.h:50:26: warning: attempt to free a non-heap object ‘temp2’ [-Wfree-nonheap-object]
#define mem_Free free
smartcard/scard/scard_wrap.c:4821:9: note: in expansion of macro ‘mem_Free’
mem_Free( arg2 );
^~~~~~~~
smartcard/scard/scard_wrap.c: In function ‘_wrap_SCardListReaders’:
smartcard/scard/memlog.h:50:26: warning: attempt to free a non-heap object ‘temp3’ [-Wfree-nonheap-object]
#define mem_Free free
smartcard/scard/scard_wrap.c:4676:9: note: in expansion of macro ‘mem_Free’
mem_Free( arg3 );
^~~~~~~~
smartcard/scard/memlog.h:50:26: warning: attempt to free a non-heap object ‘temp3’ [-Wfree-nonheap-object]
#define mem_Free free
smartcard/scard/scard_wrap.c:4732:9: note: in expansion of macro ‘mem_Free’
mem_Free( arg3 );
^~~~~~~~
smartcard/scard/scard_wrap.c: In function ‘_wrap_SCardControl’:
smartcard/scard/memlog.h:50:26: warning: attempt to free a non-heap object ‘temp4’ [-Wfree-nonheap-object]
#define mem_Free free
smartcard/scard/scard_wrap.c:4245:9: note: in expansion of macro ‘mem_Free’
mem_Free( arg4 );
^~~~~~~~
smartcard/scard/memlog.h:50:26: warning: attempt to free a non-heap object ‘temp4’ [-Wfree-nonheap-object]
#define mem_Free free
smartcard/scard/scard_wrap.c:4273:9: note: in expansion of macro ‘mem_Free’
mem_Free( arg4 );
^~~~~~~~
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/smartcard
creating build/lib.linux-x86_64-2.7/smartcard/scard
gcc -pthread -shared -B /home/lroussea/miniconda2/compiler_compat -L/home/lroussea/miniconda2/lib -Wl,-rpath=/home/lroussea/miniconda2/lib -Wl,--no-as-needed -Wl,--sysroot=/ -Wall -g -O2 -Wextra -pipe -funsigned-char -fstrict-aliasing -Wchar-subscripts -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wunused -Wuninitialized -Wpointer-arith -Wredundant-decls -Winline -Wformat -Wformat-security -Wswitch-enum -Winit-self -Wmissing-include-dirs -Wempty-body -fdiagnostics-color=auto -Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition -Wbad-function-cast -Wnested-externs -Wmissing-declarations build/temp.linux-x86_64-2.7/smartcard/scard/helpers.o build/temp.linux-x86_64-2.7/smartcard/scard/winscarddll.o build/temp.linux-x86_64-2.7/smartcard/scard/scard_wrap.o -L/home/lroussea/miniconda2/lib -lpython2.7 -o build/lib.linux-x86_64-2.7/smartcard/scard/_scard.so
copying ./smartcard/ClassLoader.py -> build/lib.linux-x86_64-2.7/smartcard
copying ./smartcard/ATR.py -> build/lib.linux-x86_64-2.7/smartcard
copying ./smartcard/guid.py -> build/lib.linux-x86_64-2.7/smartcard
copying ./smartcard/CardConnectionObserver.py -> build/lib.linux-x86_64-2.7/smartcard
copying ./smartcard/__init__.py -> build/lib.linux-x86_64-2.7/smartcard
copying ./smartcard/CardConnectionEvent.py -> build/lib.linux-x86_64-2.7/smartcard
copying ./smartcard/CardRequest.py -> build/lib.linux-x86_64-2.7/smartcard
copying ./smartcard/System.py -> build/lib.linux-x86_64-2.7/smartcard
copying ./smartcard/ulist.py -> build/lib.linux-x86_64-2.7/smartcard
copying ./smartcard/CardMonitoring.py -> build/lib.linux-x86_64-2.7/smartcard
copying ./smartcard/CardConnectionDecorator.py -> build/lib.linux-x86_64-2.7/smartcard
copying ./smartcard/Observer.py -> build/lib.linux-x86_64-2.7/smartcard
copying ./smartcard/ReaderMonitoring.py -> build/lib.linux-x86_64-2.7/smartcard
copying ./smartcard/Exceptions.py -> build/lib.linux-x86_64-2.7/smartcard
copying ./smartcard/AbstractCardRequest.py -> build/lib.linux-x86_64-2.7/smartcard
copying ./smartcard/ExclusiveConnectCardConnection.py -> build/lib.linux-x86_64-2.7/smartcard
copying ./smartcard/CardNames.py -> build/lib.linux-x86_64-2.7/smartcard
copying ./smartcard/Card.py -> build/lib.linux-x86_64-2.7/smartcard
copying ./smartcard/ExclusiveTransmitCardConnection.py -> build/lib.linux-x86_64-2.7/smartcard
copying ./smartcard/CardConnection.py -> build/lib.linux-x86_64-2.7/smartcard
copying ./smartcard/Session.py -> build/lib.linux-x86_64-2.7/smartcard
copying ./smartcard/CardService.py -> build/lib.linux-x86_64-2.7/smartcard
copying ./smartcard/Synchronization.py -> build/lib.linux-x86_64-2.7/smartcard
copying ./smartcard/PassThruCardService.py -> build/lib.linux-x86_64-2.7/smartcard
copying ./smartcard/CardType.py -> build/lib.linux-x86_64-2.7/smartcard
creating build/lib.linux-x86_64-2.7/smartcard/pcsc
copying ./smartcard/pcsc/PCSCContext.py -> build/lib.linux-x86_64-2.7/smartcard/pcsc
copying ./smartcard/pcsc/PCSCCardRequest.py -> build/lib.linux-x86_64-2.7/smartcard/pcsc
copying ./smartcard/pcsc/PCSCReaderGroups.py -> build/lib.linux-x86_64-2.7/smartcard/pcsc
copying ./smartcard/pcsc/PCSCCardConnection.py -> build/lib.linux-x86_64-2.7/smartcard/pcsc
copying ./smartcard/pcsc/PCSCPart10.py -> build/lib.linux-x86_64-2.7/smartcard/pcsc
copying ./smartcard/pcsc/__init__.py -> build/lib.linux-x86_64-2.7/smartcard/pcsc
copying ./smartcard/pcsc/PCSCReader.py -> build/lib.linux-x86_64-2.7/smartcard/pcsc
copying ./smartcard/pcsc/PCSCExceptions.py -> build/lib.linux-x86_64-2.7/smartcard/pcsc
creating build/lib.linux-x86_64-2.7/smartcard/pyro
copying ./smartcard/pyro/__init__.py -> build/lib.linux-x86_64-2.7/smartcard/pyro
copying ./smartcard/pyro/PyroReader.py -> build/lib.linux-x86_64-2.7/smartcard/pyro
creating build/lib.linux-x86_64-2.7/smartcard/reader
copying ./smartcard/reader/__init__.py -> build/lib.linux-x86_64-2.7/smartcard/reader
copying ./smartcard/reader/Reader.py -> build/lib.linux-x86_64-2.7/smartcard/reader
copying ./smartcard/reader/ReaderFactory.py -> build/lib.linux-x86_64-2.7/smartcard/reader
copying ./smartcard/reader/ReaderGroups.py -> build/lib.linux-x86_64-2.7/smartcard/reader
copying ./smartcard/scard/__init__.py -> build/lib.linux-x86_64-2.7/smartcard/scard
copying ./smartcard/scard/scard.py -> build/lib.linux-x86_64-2.7/smartcard/scard
creating build/lib.linux-x86_64-2.7/smartcard/sw
copying ./smartcard/sw/ErrorChecker.py -> build/lib.linux-x86_64-2.7/smartcard/sw
copying ./smartcard/sw/ISO7816_4ErrorChecker.py -> build/lib.linux-x86_64-2.7/smartcard/sw
copying ./smartcard/sw/ErrorCheckingChain.py -> build/lib.linux-x86_64-2.7/smartcard/sw
copying ./smartcard/sw/__init__.py -> build/lib.linux-x86_64-2.7/smartcard/sw
copying ./smartcard/sw/ISO7816_9ErrorChecker.py -> build/lib.linux-x86_64-2.7/smartcard/sw
copying ./smartcard/sw/ISO7816_8ErrorChecker.py -> build/lib.linux-x86_64-2.7/smartcard/sw
copying ./smartcard/sw/ISO7816_4_SW1ErrorChecker.py -> build/lib.linux-x86_64-2.7/smartcard/sw
copying ./smartcard/sw/op21_ErrorChecker.py -> build/lib.linux-x86_64-2.7/smartcard/sw
copying ./smartcard/sw/SWExceptions.py -> build/lib.linux-x86_64-2.7/smartcard/sw
creating build/lib.linux-x86_64-2.7/smartcard/util
copying ./smartcard/util/__init__.py -> build/lib.linux-x86_64-2.7/smartcard/util
creating build/lib.linux-x86_64-2.7/smartcard/wx
copying ./smartcard/wx/SimpleSCardAppFrame.py -> build/lib.linux-x86_64-2.7/smartcard/wx
copying ./smartcard/wx/SimpleSCardApp.py -> build/lib.linux-x86_64-2.7/smartcard/wx
copying ./smartcard/wx/__init__.py -> build/lib.linux-x86_64-2.7/smartcard/wx
copying ./smartcard/wx/APDUTracerPanel.py -> build/lib.linux-x86_64-2.7/smartcard/wx
copying ./smartcard/wx/APDUHexValidator.py -> build/lib.linux-x86_64-2.7/smartcard/wx
copying ./smartcard/wx/ReaderToolbar.py -> build/lib.linux-x86_64-2.7/smartcard/wx
copying ./smartcard/wx/SimpleSCardAppEventObserver.py -> build/lib.linux-x86_64-2.7/smartcard/wx
copying ./smartcard/wx/CardAndReaderTreePanel.py -> build/lib.linux-x86_64-2.7/smartcard/wx
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/smartcard
copying build/lib.linux-x86_64-2.7/smartcard/ClassLoader.py -> build/bdist.linux-x86_64/egg/smartcard
copying build/lib.linux-x86_64-2.7/smartcard/ATR.py -> build/bdist.linux-x86_64/egg/smartcard
copying build/lib.linux-x86_64-2.7/smartcard/guid.py -> build/bdist.linux-x86_64/egg/smartcard
copying build/lib.linux-x86_64-2.7/smartcard/CardConnectionObserver.py -> build/bdist.linux-x86_64/egg/smartcard
copying build/lib.linux-x86_64-2.7/smartcard/__init__.py -> build/bdist.linux-x86_64/egg/smartcard
copying build/lib.linux-x86_64-2.7/smartcard/CardConnectionEvent.py -> build/bdist.linux-x86_64/egg/smartcard
copying build/lib.linux-x86_64-2.7/smartcard/CardRequest.py -> build/bdist.linux-x86_64/egg/smartcard
creating build/bdist.linux-x86_64/egg/smartcard/wx
copying build/lib.linux-x86_64-2.7/smartcard/wx/SimpleSCardAppFrame.py -> build/bdist.linux-x86_64/egg/smartcard/wx
copying build/lib.linux-x86_64-2.7/smartcard/wx/SimpleSCardApp.py -> build/bdist.linux-x86_64/egg/smartcard/wx
copying build/lib.linux-x86_64-2.7/smartcard/wx/__init__.py -> build/bdist.linux-x86_64/egg/smartcard/wx
copying build/lib.linux-x86_64-2.7/smartcard/wx/APDUTracerPanel.py -> build/bdist.linux-x86_64/egg/smartcard/wx
copying build/lib.linux-x86_64-2.7/smartcard/wx/APDUHexValidator.py -> build/bdist.linux-x86_64/egg/smartcard/wx
copying build/lib.linux-x86_64-2.7/smartcard/wx/ReaderToolbar.py -> build/bdist.linux-x86_64/egg/smartcard/wx
copying build/lib.linux-x86_64-2.7/smartcard/wx/SimpleSCardAppEventObserver.py -> build/bdist.linux-x86_64/egg/smartcard/wx
copying build/lib.linux-x86_64-2.7/smartcard/wx/CardAndReaderTreePanel.py -> build/bdist.linux-x86_64/egg/smartcard/wx
copying build/lib.linux-x86_64-2.7/smartcard/System.py -> build/bdist.linux-x86_64/egg/smartcard
copying build/lib.linux-x86_64-2.7/smartcard/ulist.py -> build/bdist.linux-x86_64/egg/smartcard
copying build/lib.linux-x86_64-2.7/smartcard/CardMonitoring.py -> build/bdist.linux-x86_64/egg/smartcard
copying build/lib.linux-x86_64-2.7/smartcard/CardConnectionDecorator.py -> build/bdist.linux-x86_64/egg/smartcard
copying build/lib.linux-x86_64-2.7/smartcard/Observer.py -> build/bdist.linux-x86_64/egg/smartcard
copying build/lib.linux-x86_64-2.7/smartcard/ReaderMonitoring.py -> build/bdist.linux-x86_64/egg/smartcard
copying build/lib.linux-x86_64-2.7/smartcard/Exceptions.py -> build/bdist.linux-x86_64/egg/smartcard
copying build/lib.linux-x86_64-2.7/smartcard/AbstractCardRequest.py -> build/bdist.linux-x86_64/egg/smartcard
copying build/lib.linux-x86_64-2.7/smartcard/ExclusiveConnectCardConnection.py -> build/bdist.linux-x86_64/egg/smartcard
creating build/bdist.linux-x86_64/egg/smartcard/reader
copying build/lib.linux-x86_64-2.7/smartcard/reader/__init__.py -> build/bdist.linux-x86_64/egg/smartcard/reader
copying build/lib.linux-x86_64-2.7/smartcard/reader/Reader.py -> build/bdist.linux-x86_64/egg/smartcard/reader
copying build/lib.linux-x86_64-2.7/smartcard/reader/ReaderFactory.py -> build/bdist.linux-x86_64/egg/smartcard/reader
copying build/lib.linux-x86_64-2.7/smartcard/reader/ReaderGroups.py -> build/bdist.linux-x86_64/egg/smartcard/reader
copying build/lib.linux-x86_64-2.7/smartcard/CardNames.py -> build/bdist.linux-x86_64/egg/smartcard
creating build/bdist.linux-x86_64/egg/smartcard/pyro
copying build/lib.linux-x86_64-2.7/smartcard/pyro/__init__.py -> build/bdist.linux-x86_64/egg/smartcard/pyro
copying build/lib.linux-x86_64-2.7/smartcard/pyro/PyroReader.py -> build/bdist.linux-x86_64/egg/smartcard/pyro
copying build/lib.linux-x86_64-2.7/smartcard/Card.py -> build/bdist.linux-x86_64/egg/smartcard
creating build/bdist.linux-x86_64/egg/smartcard/pcsc
copying build/lib.linux-x86_64-2.7/smartcard/pcsc/PCSCContext.py -> build/bdist.linux-x86_64/egg/smartcard/pcsc
copying build/lib.linux-x86_64-2.7/smartcard/pcsc/PCSCCardRequest.py -> build/bdist.linux-x86_64/egg/smartcard/pcsc
copying build/lib.linux-x86_64-2.7/smartcard/pcsc/PCSCReaderGroups.py -> build/bdist.linux-x86_64/egg/smartcard/pcsc
copying build/lib.linux-x86_64-2.7/smartcard/pcsc/PCSCCardConnection.py -> build/bdist.linux-x86_64/egg/smartcard/pcsc
copying build/lib.linux-x86_64-2.7/smartcard/pcsc/PCSCPart10.py -> build/bdist.linux-x86_64/egg/smartcard/pcsc
copying build/lib.linux-x86_64-2.7/smartcard/pcsc/__init__.py -> build/bdist.linux-x86_64/egg/smartcard/pcsc
copying build/lib.linux-x86_64-2.7/smartcard/pcsc/PCSCReader.py -> build/bdist.linux-x86_64/egg/smartcard/pcsc
copying build/lib.linux-x86_64-2.7/smartcard/pcsc/PCSCExceptions.py -> build/bdist.linux-x86_64/egg/smartcard/pcsc
copying build/lib.linux-x86_64-2.7/smartcard/ExclusiveTransmitCardConnection.py -> build/bdist.linux-x86_64/egg/smartcard
copying build/lib.linux-x86_64-2.7/smartcard/CardConnection.py -> build/bdist.linux-x86_64/egg/smartcard
copying build/lib.linux-x86_64-2.7/smartcard/Session.py -> build/bdist.linux-x86_64/egg/smartcard
copying build/lib.linux-x86_64-2.7/smartcard/CardService.py -> build/bdist.linux-x86_64/egg/smartcard
creating build/bdist.linux-x86_64/egg/smartcard/sw
copying build/lib.linux-x86_64-2.7/smartcard/sw/ErrorChecker.py -> build/bdist.linux-x86_64/egg/smartcard/sw
copying build/lib.linux-x86_64-2.7/smartcard/sw/ISO7816_4ErrorChecker.py -> build/bdist.linux-x86_64/egg/smartcard/sw
copying build/lib.linux-x86_64-2.7/smartcard/sw/ErrorCheckingChain.py -> build/bdist.linux-x86_64/egg/smartcard/sw
copying build/lib.linux-x86_64-2.7/smartcard/sw/__init__.py -> build/bdist.linux-x86_64/egg/smartcard/sw
copying build/lib.linux-x86_64-2.7/smartcard/sw/ISO7816_9ErrorChecker.py -> build/bdist.linux-x86_64/egg/smartcard/sw
copying build/lib.linux-x86_64-2.7/smartcard/sw/ISO7816_8ErrorChecker.py -> build/bdist.linux-x86_64/egg/smartcard/sw
copying build/lib.linux-x86_64-2.7/smartcard/sw/ISO7816_4_SW1ErrorChecker.py -> build/bdist.linux-x86_64/egg/smartcard/sw
copying build/lib.linux-x86_64-2.7/smartcard/sw/op21_ErrorChecker.py -> build/bdist.linux-x86_64/egg/smartcard/sw
copying build/lib.linux-x86_64-2.7/smartcard/sw/SWExceptions.py -> build/bdist.linux-x86_64/egg/smartcard/sw
copying build/lib.linux-x86_64-2.7/smartcard/Synchronization.py -> build/bdist.linux-x86_64/egg/smartcard
copying build/lib.linux-x86_64-2.7/smartcard/PassThruCardService.py -> build/bdist.linux-x86_64/egg/smartcard
creating build/bdist.linux-x86_64/egg/smartcard/scard
copying build/lib.linux-x86_64-2.7/smartcard/scard/__init__.py -> build/bdist.linux-x86_64/egg/smartcard/scard
copying build/lib.linux-x86_64-2.7/smartcard/scard/_scard.so -> build/bdist.linux-x86_64/egg/smartcard/scard
copying build/lib.linux-x86_64-2.7/smartcard/scard/scard.py -> build/bdist.linux-x86_64/egg/smartcard/scard
copying build/lib.linux-x86_64-2.7/smartcard/CardType.py -> build/bdist.linux-x86_64/egg/smartcard
creating build/bdist.linux-x86_64/egg/smartcard/util
copying build/lib.linux-x86_64-2.7/smartcard/util/__init__.py -> build/bdist.linux-x86_64/egg/smartcard/util
byte-compiling build/bdist.linux-x86_64/egg/smartcard/ClassLoader.py to ClassLoader.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/ATR.py to ATR.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/guid.py to guid.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/CardConnectionObserver.py to CardConnectionObserver.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/CardConnectionEvent.py to CardConnectionEvent.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/CardRequest.py to CardRequest.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/wx/SimpleSCardAppFrame.py to SimpleSCardAppFrame.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/wx/SimpleSCardApp.py to SimpleSCardApp.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/wx/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/wx/APDUTracerPanel.py to APDUTracerPanel.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/wx/APDUHexValidator.py to APDUHexValidator.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/wx/ReaderToolbar.py to ReaderToolbar.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/wx/SimpleSCardAppEventObserver.py to SimpleSCardAppEventObserver.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/wx/CardAndReaderTreePanel.py to CardAndReaderTreePanel.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/System.py to System.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/ulist.py to ulist.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/CardMonitoring.py to CardMonitoring.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/CardConnectionDecorator.py to CardConnectionDecorator.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/Observer.py to Observer.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/ReaderMonitoring.py to ReaderMonitoring.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/Exceptions.py to Exceptions.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/AbstractCardRequest.py to AbstractCardRequest.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/ExclusiveConnectCardConnection.py to ExclusiveConnectCardConnection.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/reader/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/reader/Reader.py to Reader.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/reader/ReaderFactory.py to ReaderFactory.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/reader/ReaderGroups.py to ReaderGroups.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/CardNames.py to CardNames.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/pyro/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/pyro/PyroReader.py to PyroReader.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/Card.py to Card.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/pcsc/PCSCContext.py to PCSCContext.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/pcsc/PCSCCardRequest.py to PCSCCardRequest.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/pcsc/PCSCReaderGroups.py to PCSCReaderGroups.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/pcsc/PCSCCardConnection.py to PCSCCardConnection.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/pcsc/PCSCPart10.py to PCSCPart10.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/pcsc/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/pcsc/PCSCReader.py to PCSCReader.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/pcsc/PCSCExceptions.py to PCSCExceptions.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/ExclusiveTransmitCardConnection.py to ExclusiveTransmitCardConnection.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/CardConnection.py to CardConnection.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/Session.py to Session.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/CardService.py to CardService.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/sw/ErrorChecker.py to ErrorChecker.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/sw/ISO7816_4ErrorChecker.py to ISO7816_4ErrorChecker.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/sw/ErrorCheckingChain.py to ErrorCheckingChain.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/sw/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/sw/ISO7816_9ErrorChecker.py to ISO7816_9ErrorChecker.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/sw/ISO7816_8ErrorChecker.py to ISO7816_8ErrorChecker.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/sw/ISO7816_4_SW1ErrorChecker.py to ISO7816_4_SW1ErrorChecker.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/sw/op21_ErrorChecker.py to op21_ErrorChecker.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/sw/SWExceptions.py to SWExceptions.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/Synchronization.py to Synchronization.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/PassThruCardService.py to PassThruCardService.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/scard/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/scard/scard.py to scard.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/CardType.py to CardType.pyc
byte-compiling build/bdist.linux-x86_64/egg/smartcard/util/__init__.py to __init__.pyc
creating stub loader for smartcard/scard/_scard.so
byte-compiling build/bdist.linux-x86_64/egg/smartcard/scard/_scard.py to _scard.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying pyscard.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pyscard.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pyscard.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pyscard.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pyscard.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
writing build/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt
zip_safe flag not set; analyzing archive contents...
smartcard.scard.scard: module references __file__
smartcard.wx.__init__: module references __file__
creating 'dist/pyscard-1.9.6-py2.7-linux-x86_64.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing pyscard-1.9.6-py2.7-linux-x86_64.egg
creating /home/lroussea/miniconda2/lib/python2.7/site-packages/pyscard-1.9.6-py2.7-linux-x86_64.egg
Extracting pyscard-1.9.6-py2.7-linux-x86_64.egg to /home/lroussea/miniconda2/lib/python2.7/site-packages
Adding pyscard 1.9.6 to easy-install.pth file
Installed /home/lroussea/miniconda2/lib/python2.7/site-packages/pyscard-1.9.6-py2.7-linux-x86_64.egg
Processing dependencies for pyscard==1.9.6
Finished processing dependencies for pyscard==1.9.6
And I can use pyscard:
$ python
Python 2.7.14 |Anaconda, Inc.| (default, Dec 7 2017, 17:05:42)
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import smartcard
>>> from smartcard.System import readers
>>> print readers()
[]
>>>
The file _scard.so
is in /home/lroussea/miniconda2/lib/python2.7/site-packages/pyscard-1.9.6-py2.7-linux-x86_64.egg/smartcard/scard/_scard.so
.
If I rename the file I get your error:
$ python
Python 2.7.14 |Anaconda, Inc.| (default, Dec 7 2017, 17:05:42)
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import smartcard
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/lroussea/miniconda2/lib/python2.7/site-packages/pyscard-1.9.6-py2.7-linux-x86_64.egg/smartcard/__init__.py", line 29, in <module>
from smartcard.System import listReaders
File "/home/lroussea/miniconda2/lib/python2.7/site-packages/pyscard-1.9.6-py2.7-linux-x86_64.egg/smartcard/System.py", line 28, in <module>
import smartcard.reader.ReaderFactory
File "/home/lroussea/miniconda2/lib/python2.7/site-packages/pyscard-1.9.6-py2.7-linux-x86_64.egg/smartcard/reader/ReaderFactory.py", line 34, in <module>
from smartcard.pcsc.PCSCReader import PCSCReader
File "/home/lroussea/miniconda2/lib/python2.7/site-packages/pyscard-1.9.6-py2.7-linux-x86_64.egg/smartcard/pcsc/PCSCReader.py", line 28, in <module>
from smartcard.pcsc.PCSCContext import PCSCContext
File "/home/lroussea/miniconda2/lib/python2.7/site-packages/pyscard-1.9.6-py2.7-linux-x86_64.egg/smartcard/pcsc/PCSCContext.py", line 27, in <module>
from smartcard.scard import *
File "/home/lroussea/miniconda2/lib/python2.7/site-packages/pyscard-1.9.6-py2.7-linux-x86_64.egg/smartcard/scard/__init__.py", line 1, in <module>
from smartcard.scard.scard import *
File "/home/lroussea/miniconda2/lib/python2.7/site-packages/pyscard-1.9.6-py2.7-linux-x86_64.egg/smartcard/scard/scard.py", line 122, in <module>
_scard = swig_import_helper()
File "/home/lroussea/miniconda2/lib/python2.7/site-packages/pyscard-1.9.6-py2.7-linux-x86_64.egg/smartcard/scard/scard.py", line 121, in swig_import_helper
return importlib.import_module('_scard')
File "/home/lroussea/miniconda2/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named _scard
>>>
The package should NOT be in /usr/loca/lib/python2.7/dist-packages/...
but in the anaconda/miniconda directory.
I guess your PATH is not correct and you used the wrong python binary. You used the system python instead of the anaconda python.
Hi,
I've build pyscard with git clone and sudo python setup.py install Installation showed me this.
When opening up python and doing,
from smartcard.System import readers
I get this
The pyscard package is in the regular usr/loca/lib/python2.7/dist-packages/... And should be in the Anaconda python directory.
Is there a way I can build this to a anaconda directory?