Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vicc fails to run on debian sid with python3.11 #250

Closed
Revilum opened this issue Mar 10, 2023 · 4 comments
Closed

vicc fails to run on debian sid with python3.11 #250

Revilum opened this issue Mar 10, 2023 · 4 comments

Comments

@Revilum
Copy link

Revilum commented Mar 10, 2023

Expected behaviour

I cloned the git repository and followed the installation instructions.
no compile errors or warning occured

What should happen?
vicc to start correctly

Actual behaviour

~/vsmartcard/virtualsmartcard$ vicc
Traceback (most recent call last):
  File "/usr/local/bin/vicc", line 116, in <module>
    from virtualsmartcard.VirtualSmartcard import VirtualICC
ModuleNotFoundError: No module named 'virtualsmartcard'

What happens instead?
vicc crashes and doesn't find the virtualsmartcard python module

Steps to reproduce

  1. install vsmartcard with python3.11
  2. vicc won't run

Logs

There seems to be an inoccrent site-packages path set.
python3 -m site returns: ```
sys.path = [
'/home/nils/vsmartcard/virtualsmartcard',
'/usr/lib/python311.zip',
'/usr/lib/python3.11',
'/usr/lib/python3.11/lib-dynload',
'/home/nils/.local/lib/python3.11/site-packages',
'/usr/local/lib/python3.11/dist-packages',
'/usr/lib/python3/dist-packages',
'/usr/lib/python3.11/dist-packages',
]
USER_BASE: '/home/nils/.local' (exists)
USER_SITE: '/home/nils/.local/lib/python3.11/site-packages' (exists)
ENABLE_USER_SITE: True

while ./configure returns:
Python site-packages: /usr/local/lib/python3.11/site-packages
which is incorrect

@frankmorgner
Copy link
Owner

Not sure what's going wrong on your machine, we're using AM_PATH_PYTHON, which should have the proper detection methods in place. To work around this, please just set PYTHONPATH to the correct directory.

@MainTobias
Copy link

I've got the same problem on the latest kali-rolling(2023.3) running in wsl2. I've tried compiling from the latest release and from the git master branch. Everything seams to work until this happens. Connecting from the phone works too. Just can't use vicc. I've also tried installing python3-virtualsmartcard, however that didn't fix it.

@frankmorgner
Copy link
Owner

It is a feature of AM_PATH_PYTHON to automatically add your specified prefix to the install location of the site-packages. You may want to specify the installation prefix explicitly to avoid /usr/local, which is the default, e.g.:

./configure --prefix=/home/nils/.local

@frankmorgner
Copy link
Owner

If you don't want to install or (byte) compile the modules, you can use the scripts directly after the git checkout of the vsmartcard repository:

env PYTHONPATH=$PWD/virtualsmartcard/src/vpicc python3 virtualsmartcard/src/vpicc/vicc.in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants