ImportError: No module named "mt_exceptions" when using Mingus library

Forgive my ignorance in advance, I am very new to python. I'm trying to use python version 3 ( https://code.google.com/r/artdent-mingus-python3/ ) of the Mingus library ( https://pypi.python.org/pypi/mingus/ ) in 3.4.2. When trying to use the annotations module, I keep getting the ImportError listed in the header.

Based on my research on similar ImportError issues, I tried the following things: -I made sure there is an mt_exceptions.py file in the appropriate directory -I made sure that every mingus directory in the site-packages directory has an init .py file -I removed the .pyc files in the mingus directory

Any pointers on what I can try next?

+3


source to share


1 answer


I solved the problem by manually entering "C: \ Python34 \ Lib \ site-packages \ mingus \ core" and editing the file (in my case I had to edit notes.py from "from mt_exceptions import NoteFormatError, RangeError, FormatError" to "from mingus .core.mt_exceptions imports NoteFormatError, RangeError, FormatError "and then I got a typical Python 2.x running on a 3.x dict error. So that's the problem!

Solution: use Python 2.x, or upgrade all schmere to 3.x (This is what I do).



As you can see here , Python 3.x has slightly changed the import syntax and what exactly is going on. I had to run 2to3 through the entire mingus source code and fix the import manually from all files (basically porting everything to Python 3.x).

+3


source







All Articles