Azzera filtri
Azzera filtri

How can I import python module properly instead of namespace package

10 visualizzazioni (ultimi 30 giorni)
I'm trying to import python module asammdf with:
it gives me the following:
'<module 'asammdf' (namespace)>'
but the:
'<module 'asammdf' from 'C:\\Program Files\\Python38\\lib\\site-packages\\asammdf\\'>'
was expected.
Once I try using the library with:
MDF = py.asammdf.MDF();
I will recieve:
Unable to resolve the name py.asammdf.MDF
Any thouights how can i solve it?
* I already reinstalled python and checked the same lib on python cosole - it works there.

Risposte (1)

Al Danial
Al Danial il 16 Set 2022
Try assigning the import to a variable:
asammdf = py.importlib.import_module('asammdf');
MDF = asammdf.MDF();




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by