環境としては、Windows 8.1 64bitです。Python 2.7を使用しています。
まずは実行した手順を書きます。
最初にsetuptools,pip,wheelをインストールしました。
numpyやscipyには公式の64bit版のものがないということなので、
ここ(Unofficial Windows Binaries for Python Extension Packages)から、
- numpy-1.9.2+mkl-cp27-none-win_amd64.whl
- gensim-0.12.1-cp27-none-win_amd64.whl
- scipy-0.16.0-cp27-none-win_amd64.whl
をダウンロードしました。
次に「pip install」を使い、numpy,scipy,gensimのインストールを試みました。
なお、「pip freeze」の結果はこうなっています(実際の場所はマイドキュメントの奥です)。
C:\Users>pip freeze
You are using pip version 7.0.1, however version 7.1.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
boto==2.38.0
bz2file==0.98
gensim==0.12.1
mecab-python==0.996
numpy==1.9.2
scipy==0.16.0
six==1.9.0
smart-open==1.2.1
wheel==0.24.0
これでインストールが終わったと思ったのですが、Pythonで実行すると以下のようになりました。
C:\Users>py
Python 2.7.10 (default, May 23 2015, 09:44:00) [MSC v.1500 64 bit (AMD64)] on wi
n32
Type "help", "copyright", "credits" or "license" for more information.
import numpy
import scipy
import gensim
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\gensim_init_.py", line 6, in <module>
from gensim import parsing, matutils, interfaces, corpora, models, similarit
ies, summarization
File "C:\Python27\lib\site-packages\gensim\models_init_.py", line 7, in <mo
dule>
from .hdpmodel import HdpModel
File "C:\Python27\lib\site-packages\gensim\models\hdpmodel.py", line 41, in <m
odule>
import scipy.special as sp
File "C:\Python27\lib\site-packages\scipy\special_init_.py", line 609, in <
module>
from .lambertw import lambertw
ImportError: DLL load failed: %1 は有効な Win32 アプリケーションではありません。
64bit版のwhlでやったのでこれで問題ないかと思ったのですが、
何が原因でこうなってしまったのか、どうすればimport出来るようになるのか皆目見当がつきません。
アドバイスよろしくお願い致します。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2015/08/10 05:19
2015/08/12 12:42