'Import package with specific character in Python

I'm trying to import package in Python, but the is name include a '-' from package-name import * says my - is invalid syntax Can I fix it wihtout rename anything ? Screenshot of the invalid syntax error



Solution 1:[1]

as is written here: Python module with a dash, or hyphen (-) in its name

You can do that using import(). For example:

foobar = __import__("foo-bar")

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1