前提・実現したいこと
MacOS CatalinaにMagentaの環境を構築したい。
「Hands-On Music Generation with Magenta: Explore the role of deep learning in music generation and assisted music composition」(https://www.amazon.co.jp/Hands-Music-Generation-Magenta-composition/dp/1838824413)の書籍の説明に沿ってMagentaのバージョン1.1.7のインストールをpip install magenta==1.1.7で行なっていますが、インストール中に大きく以下の3つのエラーが出てインストールが完了しません。下記3つのエラーのうち、2番目と3番目のエラーは複数のファイルで出ています。プログラミングは今回が初めてです。
発生している問題・エラーメッセージ
ImportError: This is the Python 2 version of SymPy. To use SymPy with Python 3, please obtain a Python 3 version from http://sympy.org, or use the bin/use2to3 script if you are using the git version. ---------------------------------------- SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Sympy requires Python 2.5 or newer. Python %d.%d detected" % )? ---------------------------------------- SyntaxError: invalid syntax ----------------------------------------
該当のソースコード
python
Using cached sympy-0.7.2.tar.gz (5.5 MB) ERROR: Command errored out with exit status 1: command: /opt/miniconda3/envs/magenta/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/dz/ht0bss2s35x_669jjym37q780000gn/T/pip-install-aish6zkc/sympy_397f6806f67c4c4aaa06ec28232fbc29/setup.py'"'"'; __file__='"'"'/private/var/folders/dz/ht0bss2s35x_669jjym37q780000gn/T/pip-install-aish6zkc/sympy_397f6806f67c4c4aaa06ec28232fbc29/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/dz/ht0bss2s35x_669jjym37q780000gn/T/pip-pip-egg-info-p1xt915v cwd: /private/var/folders/dz/ht0bss2s35x_669jjym37q780000gn/T/pip-install-aish6zkc/sympy_397f6806f67c4c4aaa06ec28232fbc29/ Complete output (7 lines): Traceback (most recent call last): File "<string>", line 1, in <module> File "/private/var/folders/dz/ht0bss2s35x_669jjym37q780000gn/T/pip-install-aish6zkc/sympy_397f6806f67c4c4aaa06ec28232fbc29/setup.py", line 36, in <module> import sympy File "/private/var/folders/dz/ht0bss2s35x_669jjym37q780000gn/T/pip-install-aish6zkc/sympy_397f6806f67c4c4aaa06ec28232fbc29/sympy/__init__.py", line 34, in <module> raise ImportError("This is the Python 2 version of SymPy. To use SymPy " ImportError: This is the Python 2 version of SymPy. To use SymPy with Python 3, please obtain a Python 3 version from http://sympy.org, or use the bin/use2to3 script if you are using the git version. ---------------------------------------- WARNING: Discarding https://files.pythonhosted.org/packages/3b/f6/1efe36ce50e50d1ebdc9d069d8b89265db3db5b5321bde813312a6665e04/sympy-0.7.2.tar.gz#sha256=2304aebd298d8bd467273a32b90fd66a24ee61cbea7e892a9ddc759d50a087fc (from https://pypi.org/simple/sympy/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Using cached sympy-0.7.1.tar.gz (3.6 MB) ERROR: Command errored out with exit status 1: command: /opt/miniconda3/envs/magenta/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/dz/ht0bss2s35x_669jjym37q780000gn/T/pip-install-aish6zkc/sympy_4665792385ef46a09bc604448e566c50/setup.py'"'"'; __file__='"'"'/private/var/folders/dz/ht0bss2s35x_669jjym37q780000gn/T/pip-install-aish6zkc/sympy_4665792385ef46a09bc604448e566c50/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/dz/ht0bss2s35x_669jjym37q780000gn/T/pip-pip-egg-info-wzcxds39 cwd: /private/var/folders/dz/ht0bss2s35x_669jjym37q780000gn/T/pip-install-aish6zkc/sympy_4665792385ef46a09bc604448e566c50/ Complete output (6 lines): Traceback (most recent call last): File "<string>", line 1, in <module> File "/private/var/folders/dz/ht0bss2s35x_669jjym37q780000gn/T/pip-install-aish6zkc/sympy_4665792385ef46a09bc604448e566c50/setup.py", line 38 print "Sympy requires Python 2.5 or newer. Python %d.%d detected" % \ ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Sympy requires Python 2.5 or newer. Python %d.%d detected" % )? ---------------------------------------- WARNING: Discarding https://files.pythonhosted.org/packages/0f/bc/104757e5baf262211bb42c10c404cb4912d206ddf596dd752ae0ae9e09ff/sympy-0.7.1.tar.gz#sha256=b4ad418d4301a8a26999f91eb816a0136ffae92007f6deb14eb329b6fbd7350b (from https://pypi.org/simple/sympy/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Using cached Pygments-1.0.tar.gz (930 kB) ERROR: Command errored out with exit status 1: command: /opt/miniconda3/envs/magenta/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/dz/ht0bss2s35x_669jjym37q780000gn/T/pip-install-aish6zkc/pygments_360881d9da274e7e9514e50cde088999/setup.py'"'"'; __file__='"'"'/private/var/folders/dz/ht0bss2s35x_669jjym37q780000gn/T/pip-install-aish6zkc/pygments_360881d9da274e7e9514e50cde088999/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/dz/ht0bss2s35x_669jjym37q780000gn/T/pip-pip-egg-info-jkebl212 cwd: /private/var/folders/dz/ht0bss2s35x_669jjym37q780000gn/T/pip-install-aish6zkc/pygments_360881d9da274e7e9514e50cde088999/ Complete output (8 lines): Traceback (most recent call last): File "<string>", line 1, in <module> File "/private/var/folders/dz/ht0bss2s35x_669jjym37q780000gn/T/pip-install-aish6zkc/pygments_360881d9da274e7e9514e50cde088999/setup.py", line 3, in <module> import ez_setup File "/private/var/folders/dz/ht0bss2s35x_669jjym37q780000gn/T/pip-install-aish6zkc/pygments_360881d9da274e7e9514e50cde088999/ez_setup.py", line 86 except pkg_resources.VersionConflict, e: ^ SyntaxError: invalid syntax ---------------------------------------- WARNING: Discarding https://files.pythonhosted.org/packages/84/c6/2accebb27262b0366dabb313d295adced03667d5e4d0471c54e4932e7a10/Pygments-1.0.tar.gz#sha256=bbd1e8661e674b359a1717f13bfa9b2ff84991469b4fc3c1fa5c4d78b40766ff (from https://pypi.org/simple/pygments/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
試したこと
インターネットでエラーメッセージを検索して、2to3(Python2から3への自動コード変換)などを試しましたが、うまくいきません。
補足情報(FW/ツールのバージョンなど)
TensorFlow
回答1件
あなたの回答
tips
プレビュー