TensorFlowをpip installしたらR6034とかのエラーが出る

Published on:
Last updated:

This post is also available in: 日本語 (Japanese)

GoogleさんのディープラーニングライブラリのTensorFlowをチュートリアルに従って pip install しようとしたら以下のようなエラーが出ましたので、対処方法をメモ代わりに書いています。
環境は Windows7 64bit です。
また、この記事の一番下に書いていますが、記事を書いている時点では 32bit で動かそうとするとTensorFlowのソースコードからインストールするしかないみたいです。

Runtime Error
R6034
An application has made an attempt to load the C runtime library incorrectly. Please contact the application's support team for more information

症状

私の場合は、元々Python2.7しかPCにインストールされていなかったので、TensorFlowをチュートリアル(https://www.tensorflow.org/install/install_windows)どおり Anaconda を利用して、以下のように進めていくと、表題のエラーがでました。

conda create -n tensorflow python=3.5 
activate tensorflow
pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.2.1-cp35-cp35m-win_amd64.whl

原因

調べてみると、色々なケースがあるようです。
私の場合は、pip install の際に、Anacondaではなく Python2.7 のPATHで動作していることが原因でした。
取り急ぎ、Python2.7のPATHをAnacondaのpython3で動くように変更することでTensorFlowをインストールすることができました。

Anaconda 32bit版でインストールしようとしたら...

32bit のPCで、Anaconda 32bit版でTensorFlowをインストールしようとしたら以下のようなエラーが出ます。
原因は、pythonは3.5.x なのかどうか?64bitのPCかどうか?が問題となるみたいです。
私は32bitで動かすことは諦めて(なんかソースコードからインストールするとできるらしい...)、GoogleComputerEngineでGoogleさんのサーバーを借りて運用することにしました。

xxxxxx.whl is not a supported wheel on this platform.

No tags for this post.

About
Kuniyoshi Takemoto is the founder of Amelt.net LLC, and editor of this blog(www.amelt.net).Learn more and follow me on LinkedIn.