Miserlou / chords2midi

Create MIDI files from numerical chord progressions!
356 stars 21 forks source link

Running c2m raises error #16

Closed atodniAr closed 5 years ago

atodniAr commented 5 years ago

On Mac Mojave, python 3.6.7 virtual env builded with miniconda.

I tried pip install chords2midi and got this:

Downloading https://pypi.tuna.tsinghua.edu.cn/packages/00/e5/069c9b8a770a74f664a5bf0913dd6ffcb14f41615f1eca322b3de16e843c/chords2midi-0.3.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/65/fpvd_gy94n5ftd_dwscjfqd8rntvdn/T/pip-install-779msiyv/chords2midi/setup.py", line 12, in <module>
        with open(os.path.join(os.path.dirname(__file__), 'requirements.txt')) as f:
    FileNotFoundError: [Errno 2] No such file or directory: '/private/var/folders/65/fpvd_gy94n5ftd_dwscjfqd8rntvdn/T/pip-install-779msiyv/chords2midi/requirements.txt'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/65/fpvd_gy94n5ftd_dwscjfqd8rntvdn/T/pip-install-779msiyv/chords2midi/

So I cloned the repo and ran python setup.py build and then python setup.py install. Then it prompted dependencies processing finished, but I saw:

Best match: mingus 0.5.1
Processing mingus-0.5.1.tar.gz
Writing /var/folders/65/fpvd_gy94n5ftd_dwscjfqd8rntvdn/T/easy_install-qcw4jkxf/mingus-0.5.1/setup.cfg
Running mingus-0.5.1/setup.py -q bdist_egg --dist-dir /var/folders/65/fpvd_gy94n5ftd_dwscjfqd8rntvdn/T/easy_install-qcw4jkxf/mingus-0.5.1/egg-dist-tmp-n5d6hfu9
  File "build/bdist.macosx-10.7-x86_64/egg/mingus/core/chords.py", line 769
    raise NoteFormatError, "Unrecognised note '%s' in chord '%s'"\
                         ^
SyntaxError: invalid syntax

  File "build/bdist.macosx-10.7-x86_64/egg/mingus/midi/midi_file_in.py", line 68
    print "Don't know how to parse this yet"
                                           ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Don't know how to parse this yet")?

  File "build/bdist.macosx-10.7-x86_64/egg/mingus/midi/midi_file_out.py", line 58
    print "Couldn't open '%s' for writing." % file
                                          ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Couldn't open '%s' for writing." % file)?

  File "build/bdist.macosx-10.7-x86_64/egg/mingus/midi/pyfluidsynth.py", line 37
    raise ImportError, "Couldn't find the FluidSynth library."
                     ^
SyntaxError: invalid syntax

  File "build/bdist.macosx-10.7-x86_64/egg/mingus/extra/musicxml.py", line 316
    zi.external_attr = 0660 << 16L
                          ^
SyntaxError: invalid token

  File "build/bdist.macosx-10.7-x86_64/egg/mingus/extra/lilypond.py", line 224
    print 'Executing: %s' % command
                        ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('Executing: %s' % command)?

  File "build/bdist.macosx-10.7-x86_64/egg/mingus/containers/track.py", line 65
    raise InstrumentRangeError, \
                              ^
SyntaxError: invalid syntax

When I ran c2m in terminal, it failed with:

Traceback (most recent call last):
  File "/Users/xyz/miniconda3/envs/c2m/bin/c2m", line 11, in <module>
    load_entry_point('chords2midi==0.5.0', 'console_scripts', 'c2m')()
  File "/Users/xyz/miniconda3/envs/c2m/lib/python3.6/site-packages/pkg_resources/__init__.py", line 487, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/Users/xyz/miniconda3/envs/c2m/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2728, in load_entry_point
    return ep.load()
  File "/Users/xyz/miniconda3/envs/c2m/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2346, in load
    return self.resolve()
  File "/Users/xyz/miniconda3/envs/c2m/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2352, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/Users/xyz/miniconda3/envs/c2m/lib/python3.6/site-packages/chords2midi-0.5.0-py3.6.egg/chords2midi/c2m.py", line 9, in <module>
  File "/Users/xyz/miniconda3/envs/c2m/lib/python3.6/site-packages/mingus-0.5.1-py3.6.egg/mingus/core/progressions.py", line 32, in <module>
ModuleNotFoundError: No module named 'notes'

I'm not sure where to go. Love this package (as a part time music producer), any idea how to fix this?

atodniAr commented 5 years ago

nvm I got this is a python2 package, probably add some indication in the readme?