LudovicRousseau / pyscard

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

No module named 'smartcard.CardType' #133

Closed msfu101 closed 1 year ago

msfu101 commented 2 years ago

Hi there, i use ubuntu 18.04.5, python-pyscard version is 1.9.6.2 and python version is 2.7.17

My issue is that if i use the sysmo-isim-tool i get the error no module named smartcard.CardType

root:~/sysmo-usim-tool #? $ ./sysmo-isim-tool.sja2.py -a 94736127 -o Traceback (most recent call last): File "./sysmo-isim-tool.sja2.py", line 28, in from simcard import * File "/root/sysmo-usim-tool/simcard.py", line 26, in from card.USIM import USIM File "/root/sysmo-usim-tool/card/USIM.py", line 32, in from card.ICC import UICC, ISO7816 File "/root/sysmo-usim-tool/card/ICC.py", line 37, in from smartcard.CardType import AnyCardType ModuleNotFoundError: No module named 'smartcard.CardType'

if i google for smartcard.CardType i get no solutions i think it is an error with pyscard because this tool works on another pc an i did no changes in it. i don't know how to solve this issue. can you help me?

LudovicRousseau commented 2 years ago

Try this in a terminal:

python -c "from smartcard.CardType import AnyCardType"
LudovicRousseau commented 2 years ago

Any news? Have you found the solution?

ChoLiu commented 2 years ago

I tried python3 -c "from smartcard.CardType import AnyCardType" Still get the error. Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'smartcard.CardType'

I am on Ubuntu 20.04, need some help to get the package work.

LudovicRousseau commented 2 years ago

@ChoLiu please create a new issue since you use a different version of Ubuntu and a different version of Python.

ChoLiu commented 2 years ago

@LudovicRousseau I reinstalled the pyscard with pip then it worked. Thank you tho