That's a Python-language module (library) import problem. It is not specifically a
Raspberry Pi problem. I see it everywhere Python is used. I get hit with it, myself.
The source of the problem is most likely a name conflict between files in your program and a library. This is a confusing
limitation in Python where the import statement will cheerfully import a module that's
in your program's directory/folder *instead* of the desired library which is stored elsewhere
on the computer/Pi. Maybe that's enough info that you can change a file name and fix that error.
You appear to be using Python virtual environments. Those can help, but they don't
automatically solve this kind of a problem.
To enable experts to help, please post the line of code that triggers the problem.
It would be best to post the full text of your program up to and including the
line where the error occurs. Please also post a listing or screenshot of the directory/folder
where your program is stored.
Raspberry Pi problem. I see it everywhere Python is used. I get hit with it, myself.
The source of the problem is most likely a name conflict between files in your program and a library. This is a confusing
limitation in Python where the import statement will cheerfully import a module that's
in your program's directory/folder *instead* of the desired library which is stored elsewhere
on the computer/Pi. Maybe that's enough info that you can change a file name and fix that error.
You appear to be using Python virtual environments. Those can help, but they don't
automatically solve this kind of a problem.
To enable experts to help, please post the line of code that triggers the problem.
It would be best to post the full text of your program up to and including the
line where the error occurs. Please also post a listing or screenshot of the directory/folder
where your program is stored.
Statistics: Posted by Eirikur — Sun Jan 21, 2024 9:59 am