The chapter enlightens about the prerequisites for installing Gensim, its core dependencies and information about its current version.
In order to install Gensim, we must have Python installed on our computers. You can go to the link www.python.org/downloads/ and select the latest version for your OS i.e. Windows and Linux/Unix. You can refer to the link www.howcodex.com/python3/index.htm for basic tutorial on Python. Gensim is supported for Linux, Windows and Mac OS X.
Gensim should run on any platform that supports Python 2.7 or 3.5+ and NumPy. It actually depends on the following software −
Gensim is tested with Python versions 2.7, 3.5, 3.6, and 3.7.
As we know that, NumPy is a package for scientific computing with Python. It can also be used as an efficient multi-dimensional container of generic data. Gensim depends on NumPy package for number crunching. For basic tutorial on Python, you can refer to the link www.howcodex.com/numpy/index.htm.
smart_open, a Python 2 & Python 3 library, is used for efficient streaming of very large files. It supports streaming from/to storages such as S3, HDFS, WebHDFS, HTTP, HTTPS, SFTP, or local filesystems. Gensim depends upon smart_open Python library for transparently opening files on remote storage as well as compressed files.
The current version of Gensim is 3.8.0 which was released in July 2019.
One of the simplest ways to install Gensim, is to run the following command in your terminal −
pip install --upgrade gensim
An alternative way to download Gensim is, to use conda environment. Run the following command in your conda terminal −
conda install –c conda-forge gensim
Suppose, if you have downloaded and unzipped the source package, then you need to run the following commands −
python setup.py test python setup.py install