'mssql' (also tried 'sql_server.pyodbc) isn't an available database backend or couldn't be imported

I had this exact same issue and there is NOTHING online that fixed it until I finally, FINALLY, discovered the source of the issue on my own.

I don’t know if this is the same problem everyone with this issue is running into, but I have not seen a SINGLE mention of it in any online discussion, package documentation, or thread ANYWHERE.

The cause of this issue? (for me at least):

At some poin the naming convention of the top-level folder that gets installed by the ‘mssql’ package was changed. Y’know the thing that the entire program depends on to find the package? It was renamed from ‘mssql’ to ‘MsSql’, and yes, it breaks everything and no, nothing else was changed. Even within the package itself it expects ‘mssql’, not ‘MsSql’. and yes, Python treats these as two entirely different things.

If you’re working in a virtual environment (I am, so idk if this is any different if you aren’t), go into the Lib\site-packages subfolder and look for your ‘mssql’ package. If you instead find a package named ‘MsSql’, BINGO. There’s your problem. Change that back to ‘mssql’ and, if everything else is correctly set up, you’re good to go.

I hope this can save someone from the WEEKS of utter pain that this caused me.