Install Guide
User Manual:
Open the PDF directly: View PDF .
Page Count: 12

Windows Installation Guide
For Windows, it's highly recommended to Install the Anaconda package for hassle-free
complete installation. This requires approx 3GB of space. Link for Anaconda is here.
(Remember to download the windows version, By default the link will open MacOS version of
ANACONDA )
Download the 3.7 version and follow the below steps.
(The latest ANACONDA version that will appear on your screen may not be the same as
the document.)
After clicking on the Downloaded Executable File, the following window will appear. Click on
Next.
Click on I agree and in next window click on Radio button All users and then click on Next
button on next pages that comes as shown below:

Let the default folder be as given and Click on Next. In the Next page, Check the first option if
Python is not previously installed, otherwise choose the second option only.
Skip the Visual Studio Installation on next page and Complete the Installation.
After this go to the Navigator, type Anaconda and open the Conda Prompt.

After the Conda Prompt is open, use this guide to install the important packages on your
Windows system.
Install pip in the Conda Environment
$ conda install git -y
Git is a version control system and it is used to download the jupyter notebooks.
To download the code in your current Repository use the command
$ git clone https://github.com/yolo2776/labfiles
Now change the current directory to the new one we just downloaded from github:
$ cd labfiles
Install pip in the Conda Environment
$ conda install pip

Python Packages
We will need certain Python packages throughout the lab sessions. These packages are listed
below, with the commands to install them.
We recommend that you go through rest of this section to install the packages, however, if you
don’t want to install them individually, we provide a requirements.txt
file, that can be used to
download all the dependencies. Once you download the requirements.txt
file, run the following
command, after activating the virtual environment to install the dependencies:
$ pip install -r requirements.txt
Word Cloud
We use word cloud library to help us generate wordclouds. As the traditional way of installing
python dependencies produced error, we provide an alternative command which is as follows:
$ python -m pip install wordcloud-1.5.0-cp37-cp37m-win32.whl
Spacy
We use Spacy for english NER. Given below are the commands to install Spacy:
$ conda install -c conda-forge spacy -y && python -m spacy download en
Jupyter Notebook
Jupyter Notebook is widely used in academia and industry for interactable Python development
environment. Although you can work with plain Python scripts as well, we highly recommend
that you install it[3].
$ pip install jupyter
Once installed, you can run the notebook by:
$ jupyter notebook
Tweepy
We need a Python wrapper for Twitter API in order to write code in Python. There are number of
Python wrappers available, but we recommend using tweepy
[4].
$ pip install tweepy

Matplotlib
Matplotlib is a popular library used to create visualizations and plots[5].
$ pip install matplotlib
NetworkX
NetworkX is used to create, manipulate, and study of the structure and functions of complex
networks[6].
$ pip install networkx
NLTK
Natural Language Toolkit is used for basic NLP tasks[7]:
$ pip install nltk
NumPy
NumPy is majorly used to run computation on high-dimensional arrays and has defined
methods for high-level mathematical functions[8].
$ pip install numpy
Pandas
Python Data Analysis Library is a common data analysis library[9].
$ pip install pandas
SpaCy
SpaCy is another NLP library[10].
$ pip install spacy
If there is a problem with spacy installation, do the below troubleshooting.
Troubleshooting: Install spacy by using the binaries by searching for the .whl file on google.
To install a binary via .whl file, run:

$ python -m pip install <binary.whl>
Gensim
Gensim is used for topic modeling on text[11].
$ pip install gensim
Scikit-learn
It is a machine learning library for Python[12].
$ pip install scikit-learn
jsonpickle
jsonpickle is a library used for serialization and deserialization of complex Python objects to and
from JSON[15].
$ pip install jsonpickle
word_cloud
A little word cloud generator in Python[16].
$ pip install wordcloud
Troubleshooting: https://github.com/amueller/word_cloud/issues/134#issuecomment-228208102

Twitter Developer App
In order to collect data from Twitter, we would need to create a Twitter Developer App. To do so,
create an account on Twitter (if you don’t already have one), and visit the following URL:
https://apps.twitter.com/
Click on the create a developer account.
If your phone number is not verified, get it verified and click on Continue button

Select the radio button for I am requesting access for my own personal use.
Fill an account name and click on Continue

In use case details, check the tex for Academic Research.
Click on Resend it now, if the verification is pending.
Once this is complete, you will get this Welcome message.

Now click on Create an app
Now click on Create an app button.
The next page would show up a form. Fill in the required values.

You can fill any name of your choice. For example:
App name: psosm_19_app
Application Description: This is a demo app made for the social media session.
This can be used to collect the data from the Twitter app.
Website URL: https://twitter.com
Callback URLs: https://twitter.com
Tell us how this app will be used (required): This app will be used to do some academic level
research work. This is not for any industrial purpose. The content that is taken from Twitter will
be for study purpose only.
And click on Create button.
On the Review our Developer Terms click on Create:

Now go to keys and tokens Tab and note your Consumer API keys and click on create below
Access token & access token secret.
Note the following and keep it with you for the session. Please keep your Keys just generated
as a secret and don't share them with anyone.
● API key
● API secret key
● Access token
● Access token secret
____________________________________________________________________________