質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Git

Gitはオープンソースの分散バージョン管理システム(DVCS)です。

MacOS(OSX)

MacOSとは、Appleの開発していたGUI(グラフィカルユーザーインターフェース)を採用したオペレーションシステム(OS)です。Macintoshと共に、市場に出てGUIの普及に大きく貢献しました。

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

pip

pipとは、Pythonを用いて書かれているパッケージソフトのインストールや管理を行うためのパッケージマネジメントシステムです。pipを使う主なメリットは、コマンドラインインターフェースにて容易にPythonパッケージソフトをインストール可能だという点です。

Q&A

解決済

1回答

2760閲覧

Magentaのインストールが出来ません。

Masanao_S2S

総合スコア1

Git

Gitはオープンソースの分散バージョン管理システム(DVCS)です。

MacOS(OSX)

MacOSとは、Appleの開発していたGUI(グラフィカルユーザーインターフェース)を採用したオペレーションシステム(OS)です。Macintoshと共に、市場に出てGUIの普及に大きく貢献しました。

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

pip

pipとは、Pythonを用いて書かれているパッケージソフトのインストールや管理を行うためのパッケージマネジメントシステムです。pipを使う主なメリットは、コマンドラインインターフェースにて容易にPythonパッケージソフトをインストール可能だという点です。

0グッド

0クリップ

投稿2021/03/17 18:15

前提・実現したいこと

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

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

jbpb0

2021/03/17 23:38 編集

> Using cached sympy-0.7.2.tar.gz 2012年のバージョン https://pypi.org/project/sympy/0.7.2/ > Using cached Pygments-1.0.tar.gz 2008年のバージョン https://pypi.org/project/Pygments/1.0/ なぜか、とても古いバージョンのキャッシュを使ってインストールしようとしてるみたいです キャッシュを使わないオプションを付けたら、新しいのが入るかも? pip install --no-cache-dir --force-reinstall magenta==1.1.7
guest

回答1

0

ベストアンサー

magenta 2.1.3に書かれているように、

shell

1pip install magenta

でインストールしてmagenta 2.1.3を入れてみてはいかがでしょうか。

投稿2021/03/17 23:25

ppaul

総合スコア24666

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

Masanao_S2S

2021/03/18 16:21

ppaulさん、jbpb0さん、コメントありがとうございます。 「Hands-On Music Generation with Magenta」でマイグレーションガイドがあったmagenta 2.0.1のインストールを試して、無事にインストール出来ました。 的確なアドバイス、ありがとうございました。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問