#python is there a good solution for "I got `import foo` in my python file, which pypi package do I need to install to get that?"
astroid, importlib can parse the code and say, "You need module foo" but modules only sometimes match package names & packages can have 2+ modules.
Pycharm does this somehow, it will say "hey, you wrote import requests, do you want me to install it" so I infer it has solved the problem.
Stackoverflow really only has variations on what astroid/importlib does-- no link to pypi package names.♡ 0 ↻ 0The use case is when the package is *not* already installed, inspecting locally installed packages is trivial & typically, if you write `import requests` and requests is already installed, you don't have any problems to solve.
♡ 0 ↻ 0