Python word2vec does not install

I am trying to install word2vec on my windows 7 machine using my Python2.7 interpreter: https://github.com/danielfrg/word2vec

I tried to download zip and run python setup.pyinstall from the unpacked directory and run pip install. however, in both cases, it returns the following errors:

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

It seemed that there was a problem with access to subprocess.call(), therefore, after a small number of search queries, I managed to add shell=Trueword2vec to the line setup.py, and then throws this error:

'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 

To be honest, I don’t even know where to go. I also tried to install make and set the path variable to the .exe file in the installation, any advice would be greatly appreciated, thanks.

UPDATE:

word2vec , genism, , , NLP http://radimrehurek.com/gensim/

+6
6

2vec Linux. .: https://github.com/danielfrg/word2vec

, Windows: : https://github.com/zhangyafeikimi/word2vec-win32

EDIT:

, gensim: https://pypi.python.org/pypi/gensim

do:

from gensim.models import word2vec
+10

Win 7 Win 8.

  • 64- Anaconda ( Python 2.7)
  • MinGW Basic ( C ++ )
  • gensim Anaconda, "conda install gensim" ipython-notebook python word2vec, .
+3

pip python - .

1. pip

A)

  • "", " ", "".

  • .

  • " ", , - , , "".

B) get-pip.py, .py , .txt. .

python get-pip.py

get-pip.py get-pip.py ( get-pip.txt).

.

python get-pip.py

2. word2vec

pip install word2vec
+1

, C UN * X makefile, Windows. Windows.

0

word2vec (https://github.com/dav/word2vec) Windows Cygwin. , gensim - UTF-8, , ASCII.

0

word2vec scipy version 1.2.0 scipy verion 1.1

For Anaconda you need to download Scipyusing this regular con-conda install -c anaconda scipy

This will install you the current version of Scipy ...

Then you need to install gensimusing this regular condaconda install -c conda-forge gensim

I hope this helps you ...

0
source

All Articles