How to install gensim on windows

前端 未结 6 490
無奈伤痛
無奈伤痛 2021-01-03 19:03

Not able to install gensim on windows.Please help me I need to gensim Immediately and tell me installation steps with More details and other software that needs to be instal

相关标签:
6条回答
  • 2021-01-03 19:24

    I followed the instruction on https://radimrehurek.com/gensim/install.html which then successfully installed the fast version of Gensim (3.8.0) on Windows:

    conda install -c conda-forge gensim
    

    PS: The following did NOT install the fast version on Windows:

    conda install gensim
    
    0 讨论(0)
  • 2021-01-03 19:25

    First you need to install NumPy then SciPy and then Gensim (assuming you already have Python installed). I used Python 3.4 as I find it easier to install SciPy using version 3.4.

    Step 1) Install Numpy:

    Download numpy‑1.13.1+mkl‑cp34‑cp34m‑win32.whl from here

    note that in cp34-cp34m 34 is version of Python you are using. So download appropriate file

    Open command prompt and go the folder in which you just downloaded the file and install Numpy using following command:

    pip install numpy‑1.13.1+mkl‑cp34‑cp34m‑win32.whl

    You should get successfully installed numpy message

    Step 2) Install SciPy:

    Follow the same link as above and download the scipy‑0.19.1‑cp34‑cp34m‑win32.whl file. Install it using the same instructions than in Step 1 but with this file name. The command is the following:

    pip install scipy‑0.19.1‑cp34‑cp34m‑win32.whl

    You should get this message successfully installed scipy

    Step 3) Install gensim:

    Follow the link in step 1 and download gensim‑2.3.0‑cp34‑cp34m‑win32.whl (the appropriate version for your system) Install it using the instructions in Step 1 (with this file name) with following command:

    pip install gensim‑2.3.0‑cp34‑cp34m‑win32.whl

    You should get this message successfully installed gensim

    Now in a Python shell try:

    import gensim

    It should be successfully imported

    NOTES: Make sure pip is in your environment variables (add C:\python34\scripts to your environment variable).

    Make sure to download all the packages according to the Python version you are using.

    0 讨论(0)
  • 2021-01-03 19:26

    After attempting some of the above ideas, there was still a "hiccup" with gensim but the error was something else related to punkt. The following (where the interest is the second line)...

    import nltk 
    nltk.download('punkt') 
    import numpy 
    import scipy 
    import gensim
    

    ...did the trick. I used conda and not pip but do not believe that mattered.

    Versions: latest python Machine: Windows 10 (latest updates as of 8/2020)

    0 讨论(0)
  • 2021-01-03 19:31

    I struggled with this a bit today trying to figure out if I needed a python 2.7 environment or if I could use my 3.5. I ended up doing this from an Anaconda 3.5 install:

    conda install -c anaconda gensim=0.12.4

    After a few hours of trying various things, suddenly it all worked on 3.5. My error was that it kept failing to install Scipy. I tried starting over with the conda install and just worked.

    See: https://anaconda.org/anaconda/gensim

    0 讨论(0)
  • 2021-01-03 19:35

    I strongly suggest using anaconda where the installation of all the packages is very easy.

    The command for installing genism and all of its necessary packages on windows using anaconda python 3.7 is below.

    conda install -c anaconda gensim
    
    0 讨论(0)
  • 2021-01-03 19:48

    gensim depends on scipy and numpy.You must have them installed prior to installing gensim. Simple way to install gensim in windows is, open cmd and type

    pip install -U gensim
    

    Or download gensim for windows from

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

    then run

    python setup.py test  
    python setup.py install
    
    0 讨论(0)
提交回复
热议问题