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

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

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

Anacondaは、Python本体とPythonで利用されるライブラリを一括でインストールできるパッケージです。環境構築が容易になるため、Python開発者間ではよく利用されており、商用目的としても利用できます。

PyTorch

PyTorchは、オープンソースのPython向けの機械学習ライブラリ。Facebookの人工知能研究グループが開発を主導しています。強力なGPUサポートを備えたテンソル計算、テープベースの自動微分による柔軟なニューラルネットワークの記述が可能です。

JupyterLab

JupyterLabは、Jupyter notebookの後継の対話型開発環境(IDE)です。データの可視化がインタラクティブで、プラグイン作成により新しいコンポーネントの追加および既存のコンポーネントも統合可能。サーバに閉じているため、データ分析に向いています。

Python

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

Q&A

0回答

108閲覧

Tacotron2環境構築でApexがインストールできない:ModuleNotFoundError: No module named 'torch'

takespring7

総合スコア0

Anaconda

Anacondaは、Python本体とPythonで利用されるライブラリを一括でインストールできるパッケージです。環境構築が容易になるため、Python開発者間ではよく利用されており、商用目的としても利用できます。

PyTorch

PyTorchは、オープンソースのPython向けの機械学習ライブラリ。Facebookの人工知能研究グループが開発を主導しています。強力なGPUサポートを備えたテンソル計算、テープベースの自動微分による柔軟なニューラルネットワークの記述が可能です。

JupyterLab

JupyterLabは、Jupyter notebookの後継の対話型開発環境(IDE)です。データの可視化がインタラクティブで、プラグイン作成により新しいコンポーネントの追加および既存のコンポーネントも統合可能。サーバに閉じているため、データ分析に向いています。

Python

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

0グッド

0クリップ

投稿2024/10/14 02:05

編集2024/10/14 08:54

実現したいこと

Tacotron2を用いて自分の声で文章を読ませるプログラムを作成したいと思っています。そのために、Tacotron2を導入しようと考えています。環境は、AnacondaのJupyterLabを使っています

発生している問題・分からないこと

Tacotron2を導入するために以下のコマンドを実行します。

Python

1! git clone https://github.com/NVIDIA/tacotron2 2! git submodule init; git submodule update 3! pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu117 4! git clone https://github.com/nvidia/apex 5 6import os 7os.chdir('apex')

ここまでは上手く動作します。そして次のコマンドで問題は発生します。

Python

1$ pip install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./

エラー内容は以下の通りとなります。

ModuleNotFoundError: No module named 'torch'

torchが見つからないそうです。
しかし、

!pip install torch

を実行すると、

Requirement already satisfied:

と普通にtorchはインストールされています。
イメージ説明
しかし、何故か上記のような「torchが見つからない」というエラーが出てしまいます。

エラーメッセージ

error

1```エラー内容 2Using pip 22.3.1 from C:\Users\takespring\anaconda3\lib\site-packages\pip (python 3.10) 3Processing c:\users\takespring\source\anaconda_python_study\tacotron2_study\apex 4 Installing build dependencies: started 5 Installing build dependencies: finished with status 'done' 6 Getting requirements to build wheel: started 7 Getting requirements to build wheel: finished with status 'error' 8WARNING: Implying --no-binary=:all: due to the presence of --build-option / --global-option / --install-option. Consider using --config-settings for more flexibility. 9DEPRECATION: --no-binary currently disables reading from the cache of locally built wheels. In the future --no-binary will not influence the wheel cache. pip 23.1 will enforce this behaviour change. A possible replacement is to use the --no-cache-dir option. You can use the flag --use-feature=no-binary-enable-wheel-cache to test the upcoming behaviour. Discussion can be found at https://github.com/pypa/pip/issues/11453 10 Running command pip subprocess to install build dependencies 11 DEPRECATION: --no-binary currently disables reading from the cache of locally built wheels. In the future --no-binary will not influence the wheel cache. pip 23.1 will enforce this behaviour change. A possible replacement is to use the --no-cache-dir option. You can use the flag --use-feature=no-binary-enable-wheel-cache to test the upcoming behaviour. Discussion can be found at https://github.com/pypa/pip/issues/11453 12 Collecting setuptools 13 Using cached setuptools-75.1.0.tar.gz (1.3 MB) 14 Getting requirements to build wheel: started 15 Getting requirements to build wheel: finished with status 'done' 16 Preparing metadata (pyproject.toml): started 17 Preparing metadata (pyproject.toml): finished with status 'done' 18 Collecting wheel 19 Using cached wheel-0.44.0.tar.gz (100 kB) 20 Installing build dependencies: started 21 Installing build dependencies: finished with status 'done' 22 Getting requirements to build wheel: started 23 Getting requirements to build wheel: finished with status 'done' 24 Preparing metadata (pyproject.toml): started 25 Preparing metadata (pyproject.toml): finished with status 'done' 26 Building wheels for collected packages: wheel, setuptools 27 Building wheel for wheel (pyproject.toml): started 28 Building wheel for wheel (pyproject.toml): finished with status 'done' 29 Created wheel for wheel: filename=wheel-0.44.0-py3-none-any.whl size=67059 sha256=79b3427c1f582be3c4102c06d28c196d1b9815870f25d2f431c864fd160b2072 30 Stored in directory: c:\users\takespring\appdata\local\pip\cache\wheels\39\7d\c2\27f9739db1d0af92c01bc1219b8ee6601d4229aa88b3a4ec45 31 Building wheel for setuptools (pyproject.toml): started 32 Building wheel for setuptools (pyproject.toml): finished with status 'done' 33 Created wheel for setuptools: filename=setuptools-75.1.0-py3-none-any.whl size=1248534 sha256=a0b46c01c145e0713677ca5495b22515f133a86c208a0dc23757cced1f7c9b43 34 Stored in directory: c:\users\takespring\appdata\local\pip\cache\wheels\d0\c1\3b\a0bc89d43586b8e15a4c99d36be536ba6705da7668c04772c0 35 Successfully built wheel setuptools 36 Installing collected packages: wheel, setuptools 37 Successfully installed setuptools-75.1.0 wheel-0.44.0 38 Running command Getting requirements to build wheel 39 Traceback (most recent call last): 40 File "C:\Users\takespring\anaconda3\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 351, in <module> 41 main() 42 File "C:\Users\takespring\anaconda3\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 333, in main 43 json_out['return_val'] = hook(**hook_input['kwargs']) 44 File "C:\Users\takespring\anaconda3\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 118, in get_requires_for_build_wheel 45 return hook(config_settings) 46 File "C:\Users\takespring\AppData\Local\Temp\pip-build-env-v4gn59cg\overlay\Lib\site-packages\setuptools\build_meta.py", line 332, in get_requires_for_build_wheel 47 return self._get_build_requires(config_settings, requirements=[]) 48 File "C:\Users\takespring\AppData\Local\Temp\pip-build-env-v4gn59cg\overlay\Lib\site-packages\setuptools\build_meta.py", line 302, in _get_build_requires 49 self.run_setup() 50 File "C:\Users\takespring\AppData\Local\Temp\pip-build-env-v4gn59cg\overlay\Lib\site-packages\setuptools\build_meta.py", line 318, in run_setup 51 exec(code, locals()) 52 File "<string>", line 10, in <module> 53 ModuleNotFoundError: No module named 'torch' 54 error: subprocess-exited-with-error 55 56 Getting requirements to build wheel did not run successfully. 57 exit code: 1 58 59 See above for output. 60 61 note: This error originates from a subprocess, and is likely not a problem with pip. 62 full command: 'C:\Users\takespring\anaconda3\python.exe' 'C:\Users\takespring\anaconda3\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' get_requires_for_build_wheel 'C:\Users\TAKESP~1\AppData\Local\Temp\tmpuwbupcak' 63 cwd: C:\Users\takespring\source\anaconda_python_study\tacotron2_study\apex 64error: subprocess-exited-with-error 65 66Getting requirements to build wheel did not run successfully. 67exit code: 1 68 69See above for output. 70 71note: This error originates from a subprocess, and is likely not a problem with pip.
### 該当のソースコード

特になし

### 試したこと・調べたこと - [x] teratailやGoogle等で検索した - [x] ソースコードを自分なりに変更した - [ ] 知人に聞いた - [ ] その他 ##### 上記の詳細・結果 [https://github.com/NVIDIA/apex/issues/1823 ](url) このサイトで同じ問題を見つけましたが、解決はしなかったです。 ### 補足 特になし

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

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

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

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

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

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

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

ただいまの回答率
85.39%

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

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

質問する

関連した質問