When I install a python module (for example mediafile) with pip I can import it like this:
from mediafile import MediaFile
and it works perfectly.
But then I install it to a different location (pip install --target="C:/msys64/home/myname/myprogram/tools/mediafile/" mediafile), I can only import it like this:
from tools import mediafile
and importing MediaFile just doesn't work. (I tried from tools.mediafile import MediaFile and a couple of other variations with no success).
Here's an ouptut :
ImportError: cannot import name 'MediaFile' from 'tools.mediafile' (unknown location)
When I try to use mediafile.MediaFile it gives me this error :
AttributeError: module 'tools.mediafile' has no attribute 'MediaFile'
Any idea where I got the syntax wrong?