Module not found

I’m sure this is superbasic, like me.
Working on a python script on a pi4 I find out the same script will run on one folder, but id copied to a different one it wont.
I know (very little but…) about enclosed environments. The script I mention is on a folder called python and there is no env source necessary to run it. It finds the libraries it needs to import and runs well.
When I move it to the folder I use for the project, based on a BME688, the program cant find the LCD1602 Module (the library, I guess as the LCD is plugged and work ready).

Any suggestions where I should be looking? How to make libraries available to all or particular folders?

This is the code the compiler returns whe the program is run on the main project forlder:

Traceback (most recent call last):
  File "/home/fer/bme68x-python-library/examples/tests/forced_bsec_lcdDisplay.py", line 11, in <module>
    import LCD1602
ModuleNotFoundError: No module named 'LCD1602'
>>> 

Any pointers much appreciated.

Ha to go through everything form beginning… I had deleted the library that must accompany the program on the same folder, thinking it was a .py sample I didn’t use or needed.
I wonder if there is a way to commit a library to memory, so it can be accessed from anywhere.

If you open the library file in Thonny and then save it to the Pico:

File - Save as… - Raspberry Pi Pico - File name: - OK

It should be available for use from wherever you run the program.

1 Like

Ah - pi4 , not pico - sorry…

1 Like

Thank you, nevertheless.

1 Like