flipperzero-firmware icon indicating copy to clipboard operation
flipperzero-firmware copied to clipboard

Python scripts do not find python libraries installed in the new toolchain

Open Kingwad opened this issue 3 years ago • 1 comments

Describe the bug.

The new toolchain folder includes several python libraries, for example pyserial, but the python scripts, for example storage.py, still require the libraries to be installed in the system.

Reproduction

remove pyserial library from the os installed Python libraries Make sure the toolchain folder is up to date via fbt Confirm that the toolchain contains the serial package (toolchain/x86_64-linux/python/lib/python3.9/site-packages/serial) Run storage.py See that it cannot find the serial package

Target

No response

Logs

>: python scripts/storage.py 
Traceback (most recent call last):
  File "/home/user/Development/flipperzero-firmware/scripts/storage.py", line 4, in <module>
    from flipper.storage import FlipperStorage
  File "/home/user/Development/flipperzero-firmware/scripts/flipper/storage.py", line 3, in <module>
    import serial
ModuleNotFoundError: No module named 'serial'

Anything else?

No response

Kingwad avatar Jul 29 '22 17:07 Kingwad

Toolchain and supplemental environment are set up by additional scripts. Soon there will be a way to spawn a shell with all toolchain's tools in it, so what you described will no longer be an issue.

hedger avatar Jul 29 '22 17:07 hedger

Check ./scripts/toolchain/fbtenv.sh and reopen issue if problem persist.

skotopes avatar Sep 06 '22 17:09 skotopes