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

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

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

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

Python 3.x

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

Q&A

解決済

1回答

2461閲覧

tslearnを使いたい

DNNTECH

総合スコア12

Anaconda

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

Python 3.x

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

0グッド

0クリップ

投稿2019/05/07 11:30

時系列波形のクラスタリングをするモジュールtslearnを使いたいです.

Anaconda環境でPythonを使っています.
現在,以下のURLを参考にtslearnをインストールしようとしていますができません.
リンク内容
JupyterLab上で,pipを使ってインストールしようとすると,プログラムが動かなくなります.

terminal上で,pipでインストールしようとすると,以下の結果が出力されます.

Collecting tslearn Using cached https://files.pythonhosted.org/packages/af/f9/7225f4b1e7ba482b10b544cecf50a0a92bfbbde4ec30fdce824a867ad9ab/tslearn-0.1.29.tar.gz Requirement already satisfied: numpy in c:\users\takeo\anaconda3\envs\tensorflow-gpu\lib\site-packages (from tslearn) (1.16.3) Requirement already satisfied: scipy in c:\users\takeo\anaconda3\envs\tensorflow-gpu\lib\site-packages (from tslearn) (1.2.1) Requirement already satisfied: scikit-learn in c:\users\takeo\anaconda3\envs\tensorflow-gpu\lib\site-packages (from tslearn) (0.20.3) Requirement already satisfied: Cython in c:\users\takeo\anaconda3\envs\tensorflow-gpu\lib\site-packages (from tslearn) (0.29.7) Building wheels for collected packages: tslearn Building wheel for tslearn (setup.py) ... error ERROR: Complete output from command 'C:\Users\Takeo\Anaconda3\envs\tensorflow-gpu\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\Users\Takeo\AppData\Local\Temp\pip-install-2rcc45rk\tslearn\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Takeo\AppData\Local\Temp\pip-wheel-qhc4idkr' --python-tag cp36: ERROR: running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-3.6 creating build\lib.win-amd64-3.6\tslearn copying tslearn\barycenters.py -> build\lib.win-amd64-3.6\tslearn copying tslearn\clustering.py -> build\lib.win-amd64-3.6\tslearn copying tslearn\datasets.py -> build\lib.win-amd64-3.6\tslearn copying tslearn\generators.py -> build\lib.win-amd64-3.6\tslearn copying tslearn\metrics.py -> build\lib.win-amd64-3.6\tslearn copying tslearn\neighbors.py -> build\lib.win-amd64-3.6\tslearn copying tslearn\piecewise.py -> build\lib.win-amd64-3.6\tslearn copying tslearn\preprocessing.py -> build\lib.win-amd64-3.6\tslearn copying tslearn\shapelets.py -> build\lib.win-amd64-3.6\tslearn copying tslearn\svm.py -> build\lib.win-amd64-3.6\tslearn copying tslearn\utils.py -> build\lib.win-amd64-3.6\tslearn copying tslearn\__init__.py -> build\lib.win-amd64-3.6\tslearn creating build\lib.win-amd64-3.6\tslearn.cached_datasets copying tslearn.cached_datasets\Trace.npz -> build\lib.win-amd64-3.6\tslearn.cached_datasets running build_ext skipping 'tslearn\cydtw.c' Cython extension (up-to-date) building 'tslearn.cydtw' extension creating build\temp.win-amd64-3.6 creating build\temp.win-amd64-3.6\Release creating build\temp.win-amd64-3.6\Release\tslearn cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -IC:\Users\Takeo\Anaconda3\envs\tensorflow-gpu\lib\site-packages\numpy\core\include -IC:\Users\Takeo\Anaconda3\envs\tensorflow-gpu\lib\site-packages\numpy\core\include -IC:\Users\Takeo\Anaconda3\envs\tensorflow-gpu\include -IC:\Users\Takeo\Anaconda3\envs\tensorflow-gpu\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\Include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" /Tctslearn\cydtw.c /Fobuild\temp.win-amd64-3.6\Release\tslearn\cydtw.obj error: command 'cl.exe' failed: No such file or directory ---------------------------------------- ERROR: Failed building wheel for tslearn Running setup.py clean for tslearn Failed to build tslearn Installing collected packages: tslearn Running setup.py install for tslearn ... error ERROR: Complete output from command 'C:\Users\Takeo\Anaconda3\envs\tensorflow-gpu\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\Users\Takeo\AppData\Local\Temp\pip-install-2rcc45rk\tslearn\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Takeo\AppData\Local\Temp\pip-record-wrk58n32\install-record.txt' --single-version-externally-managed --compile: ERROR: running install running build running build_py creating build creating build\lib.win-amd64-3.6 creating build\lib.win-amd64-3.6\tslearn copying tslearn\barycenters.py -> build\lib.win-amd64-3.6\tslearn copying tslearn\clustering.py -> build\lib.win-amd64-3.6\tslearn copying tslearn\datasets.py -> build\lib.win-amd64-3.6\tslearn copying tslearn\generators.py -> build\lib.win-amd64-3.6\tslearn copying tslearn\metrics.py -> build\lib.win-amd64-3.6\tslearn copying tslearn\neighbors.py -> build\lib.win-amd64-3.6\tslearn copying tslearn\piecewise.py -> build\lib.win-amd64-3.6\tslearn copying tslearn\preprocessing.py -> build\lib.win-amd64-3.6\tslearn copying tslearn\shapelets.py -> build\lib.win-amd64-3.6\tslearn copying tslearn\svm.py -> build\lib.win-amd64-3.6\tslearn copying tslearn\utils.py -> build\lib.win-amd64-3.6\tslearn copying tslearn\__init__.py -> build\lib.win-amd64-3.6\tslearn creating build\lib.win-amd64-3.6\tslearn.cached_datasets copying tslearn.cached_datasets\Trace.npz -> build\lib.win-amd64-3.6\tslearn.cached_datasets running build_ext skipping 'tslearn\cydtw.c' Cython extension (up-to-date) building 'tslearn.cydtw' extension creating build\temp.win-amd64-3.6 creating build\temp.win-amd64-3.6\Release creating build\temp.win-amd64-3.6\Release\tslearn cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -IC:\Users\Takeo\Anaconda3\envs\tensorflow-gpu\lib\site-packages\numpy\core\include -IC:\Users\Takeo\Anaconda3\envs\tensorflow-gpu\lib\site-packages\numpy\core\include -IC:\Users\Takeo\Anaconda3\envs\tensorflow-gpu\include -IC:\Users\Takeo\Anaconda3\envs\tensorflow-gpu\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\Include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" /Tctslearn\cydtw.c /Fobuild\temp.win-amd64-3.6\Release\tslearn\cydtw.obj error: command 'cl.exe' failed: No such file or directory ---------------------------------------- ERROR: Command "'C:\Users\Takeo\Anaconda3\envs\tensorflow-gpu\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\Users\Takeo\AppData\Local\Temp\pip-install-2rcc45rk\tslearn\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Takeo\AppData\Local\Temp\pip-record-wrk58n32\install-record.txt' --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Takeo\AppData\Local\Temp\pip-install-2rcc45rk\tslearn\

何が原因となっているか,検索しても見当たらず,困っております.
どなたかご教授いただけますと幸いです.

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

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

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

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

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

guest

回答1

0

ベストアンサー

エラーメッセージによるとcl.exeがないことがエラーの原因です。たしか、cl.exeはcのコンパイラのはずなので、マイクロソフトのmsvcのあたりをインストールする必要があると思われます。

なお、ネットを検索したところ、

conda install -c conda-forge tslearn

でインストール可能のようです。試していないので確実ではありませんが、こちらのほうが手間要らずかもしれません

投稿2019/05/07 17:18

R.Shigemori

総合スコア3376

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

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

DNNTECH

2019/05/08 00:16

ご回答ありがとうございます. 試してみます.
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問