ModuleNotFoundError: No module named 'lascar.tools'

Dear all,
To use lascar module, in my jupyter notebook, I typed

git clone https://github.com/Ledger-Donjon/lascar.git
cd lascar
  Then I found that the execution of the following line
python3 setup.py develop

would take too much time; thus I type this line in my command line terminal.
Then I restart the kernel; I execute the following lines in jupyter notebook,

from lascar import *
from lascar.tools.aes import sbox, inv_sbox

I got an error message as:
ModuleNotFoundError: No module named ‘lascar.tools’

Why?

If you remove the from lascar.tools.aes import sbox, inv_sbox line, does the command succeed?

Alex

Hello, I’m facing a similar issue in lab 1_1B (SCA201).
When I run these commands:

Thank you,
Nafisa

I couldn’t attach the error picture on other post , here it is:

Hey Nafisa,
The way I fixed this problem is as follows:
1. Go to the folder WPy64-3740, click WinPython Command Prompt.
2. Follow the steps, first type

1 pip3 install lascar

Once the installation completes, type

2 cd lascar
3 python setup.py develop

Now, reset the jupyter kernel. Hope this would help you.

Alan.

Unable to import LASCAR, running on windows, I have already install LASCAR and associated library

Hi,

You need to make sure that the python you’re installing LASCAR to is the same one that is running in Jupyter. How have you installed ChipWhisperer?

Alex

Default installation for chipwhisperer, should I move lascar folder under chipwhisperer directory and pip install there?

Do you mean that you used our windows installer? If so, python is used inside a virtual env, so you need to activate that (call \path\to\cwinstall\cwenv\Scripts\activate.bat) before trying to install LASCAR.