Abjad installed but assert error

THANK YOU for putting this together Marc.

I receive this error in the test file copied from the command line.

Python 3.9.1 (v3.9.1:1e5d33e9b9
[Clang 6.0 (clang-600.0.57)] on darwin
Type “help”, “copyright”, “credits” or “license” for more information.

from scamp import test_run
WARNING:root:pynput was not found; mouse and keyboard input will not be available.

test_run.play(show_lilypond=True)
WARNING:root:abjad was not found; lilypond output will not be available.
Traceback (most recent call last):
File “”, line 1, in
File “/Users/kronic/Library/Python/3.9/lib/python/site-packages/scamp/test_run.py”, line 49, in play
score.show()
File “/Users/kronic/Library/Python/3.9/lib/python/site-packages/scamp/score.py”, line 633, in show
assert abjad() is not None, “Abjad is required for this operation.”
AssertionError: Abjad is required for this operation.

I believe I have Abjad installed, since I ran the following:

pip3 install --user abjad==3.1

and see the following:

Requirement already satisfied: abjad==3.1 in …

How can I overcome this issue?

Hmm… maybe you have multiple versions of python3, and installed abjad to the wrong one? What happens if you simply open up the python interpreter and type import abjad?

Hi so this happens:

import abjad
Traceback (most recent call last):
File “”, line 1, in
File “/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/abjad/init.py”, line 13, in
from abjad.system.AbjadConfiguration import AbjadConfiguration
File “/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/abjad/system/init.py”, line 5, in
from .AbjadConfiguration import AbjadConfiguration
File “/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/abjad/system/AbjadConfiguration.py”, line 6, in
from abjad.system.Configuration import Configuration
File “/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/abjad/system/Configuration.py”, line 8, in
import six
ModuleNotFoundError: No module named ‘six’

This worked

sudo pip3 install --upgrade pip
pip3 install --user --upgrade matplotlib
pip3 install six
1 Like

How strange! Glad you tracked it down, and thanks for posting the fix. :slight_smile: