Home > Net >  ModuleNotFoundError when trying to import can package
ModuleNotFoundError when trying to import can package

Time:08-20

When I try to run code with imported can package 1 I get an error ModuleNotFoundError: No module named 'can.interfaces'; 'can' is not a package 2. My interpreter path is global 3 and packages are installed in the C:\Python\Python310\Lib\site-packages. What might cause the problem? I'm using Windows 10.

CodePudding user response:

You have named your file can, so it is shadowing the import that you want. Rename it to something else

CodePudding user response:

I think you can try following command first :

`pip install python3-can`

Afterward, I could implement the libs you needed.

  • Related