Python2.7 インタープリターを使用して Windows 7 マシンに word2vec をインストールしようとしています: https://github.com/danielfrg/word2vec
setup.py
zip をダウンロードして、解凍したディレクトリからpython install を実行して実行してみましたpip install
。ただし、どちらの場合も、次のエラーが返されます。
Downloading/unpacking word2vec
Downloading word2vec-0.5.1.tar.gz
Running setup.py egg_info for package word2vec
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "c:\users\georgioa\appdata\local\temp\pip_build_georgioa\word2vec\setup.py", line 17, in <module>
subprocess.call(['make', '-C', 'word2vec-c'])
File "C:\Python27\lib\subprocess.py", line 524, in call
return Popen(*popenargs, **kwargs).wait()
File "C:\Python27\lib\subprocess.py", line 711, in __init__
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 948, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "c:\users\georgioa\appdata\local\temp\pip_build_georgioa\word2vec\setup.py", line 17, in <module>
subprocess.call(['make', '-C', 'word2vec-c'])
File "C:\Python27\lib\subprocess.py", line 524, in call
return Popen(*popenargs, **kwargs).wait()
File "C:\Python27\lib\subprocess.py", line 711, in __init__
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 948, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
へのアクセスsubprocess.call()
に問題があるようだったので、少しグーグルで検索した後shell=True
、行に word2vec を追加すると、次のsetup.py
エラーがスローされました。
'make' is not recognized as an internal or external command,
operable program or batch file.
C:\Python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
warnings.warn(msg)
running install
running build
running build_py
running install_lib
running install_data
error: can't copy 'bin\word2vec': doesn't exist or not a regular file
正直なところ、ここからどこへ行けばいいのかさえわかりません。また、make をインストールして、インストール時にパス変数を .exe ファイルに設定しようとしました。アドバイスをいただければ幸いです。
アップデート:
word2vec モジュールは機能しないと呼ばれるパッケージはgenism
かなりうまく機能しているようですが、他にもいくつかの優れた NLP 機能がありますhttp://radimrehurek.com/gensim/