Windows Install Guide - WheatonCS/Lexos GitHub Wiki

Windows Manual Installation Guide

(for current development Master branch)

Overview:

  1. About Lexos
  2. Installing Python and Anaconda
  3. Downloading and Extracting Lexos
  4. Starting and Launching Lexos
  5. Quitting Lexos

About Lexos

Lexos is an integrated workflow of tools to facilitate computational text analysis, presented in a web-based interface. Lexos is written primarily in Python 3.6 using the Flask microframework, based on Werkzeug and Jinja 2. A heavy dose of Javascript and CSS is included on the front-end. We increasingly incorporate the wiz from D3.js in our visualizations and the power in the scikit-learn modules for text and statistical processing.

Installing Python and Anaconda

We will be using the most recent version of Python from the Anaconda distribution, currently that is Python 3.8.5. If you do not already have Python v3.8.5 installed on your computer, we recommend installing it through the free Anaconda distribution.[1] If you already have Python, Anaconda will run alongside your current installation.

  1. Visit the Anaconda downloads page on the web: https://www.anaconda.com/download/. Scroll to the bottom and find the section labeled Anaconda Installers.
  2. Download the Python 3.8 version 64-Bit by clicking on the green Download button.

If you have an older computer, you may have to use the Windows 32-bit version, in which case, you should click the smaller link below. If you are unsure whether your computer is running a 32-bit or a 64-bit version of Windows, follow the instructions at https://support.microsoft.com/en-us/kb/827218.

  1. Double-click the installer application icon (it will be called something like Anaconda3-5.2.0-Windows-x86_64.exe) and follow the instructions on the screen.

Note: The installation location is not important; however, if you want to set Anaconda as your default Python version you check the option to Add Anaconda to my PATH environment variable (make sure both boxes are checked). This will ensure that Windows knows that you want to use the Anaconda distribution of Python when you launch Lexos. This is especially important if you already have a different version of Python installed.

When the process is complete, select Finish to finish the installation of Anaconda.

You should now verify that we have installed it correctly. To do this, follow the instructions below:

  1. Open a Windows Anaconda Prompt. If you are unfamiliar with how to access the Anaconda Prompt, hit [WindowsKey] + [S] to bring up the search box and type Anaconda Prompt into the text field. Then hit the Enter key. A black Anaconda Prompt window should appear.
  2. Type python -V (capital V) and hit the Enter key.

You should see a response that looks like: Python 3.8.5.

Note: If any odd errors occur ensure your Command Prompt is displaying something like C:\Users\YOUR_NAME> as your location, otherwise exit and open a new Windows Anaconda Prompt.

Downloading and Extracting Lexos

To download Lexos, enter https://github.com/WheatonCS/Lexos in your browser's address bar. This will take you to the current version of Lexos:

Under the clone or download, download the zip file.

Once the Lexos zip archive has downloaded, right-click on the icon and click on Show in Folder to get to the file location. Right-click on the file icon and select Extract All.... Choose where you would like to install Lexos. If you wish, you may change the name of the extracted folder from Lexos-master to Lexos. In the instructions below, we will assume that you did this and that you extracted the Lexos folder to the Desktop.

Starting and Launching Lexos

Return to the Anaconda Prompt window or open a new one by typing [WindowsKey] + [S] to bring up the search box, and then type Anaconda Prompt. In most cases, the Anaconda Prompt window will open in your computer's user account directory. It will show your location by displaying something like C:\Users\YOUR_NAME>. If the Anaconda prompt says something else, you may need to navigate to this folder. For help with navigation in the Windows Command Prompt, check out this article by Wikihow: http://www.wikihow.com/Change-Directories-in-Command-Prompt (skip to Part 2: Changing the Directory).

Now navigate to the Lexos folder by typing cd Desktop\Lexos and hit the Enter key. If you encounter an error, make sure that you are starting in your user account folder, that the Lexos folder is on the Desktop, and that it is called Lexos. The Anaconda Prompt should now display C:\Users\YOUR_NAME\Desktop\Lexos>. If not, close this Anaconda Prompt window and open a new one.

Important: The Lexos Bootstrap Consensus Tree tool uses the Python sckit-bio package, which requires Microsoft Visual C++. If you downloaded the version with Lexos Bootstrap Consensus Tree tool, please follow the instructions here for installing Visual C++ and scikit-bio before proceeding. If you wish to use Lexos without Bootstrap Consensus Trees, make sure that you have downloaded that version of Lexos. You can then continue to the next step.

Type pip install -r requirements.txt and hit the Enter key. This is a one time requirement to update the additional packages needed to run Lexos. When the update is completed you should see a message on your terminal window.

Now navigate to the frontend folder by typing cd Desktop/Lexos/lexos/frontend and hit the Enter key. Type npm install and hit Enter key. If you do not have npm installed follow the instructions here to download npm and Node.js After the installation if npm install yields the error npm is not recognized as an internal or external command, restart your computer. This will install the final requirement to run Lexos.

Type python run.py and hit the Enter key. This will start Lexos. It may take a minute to see a response the first time you run the command because Python has to reconfigure some of the project files for your computer. But shortly after you should see the following:

Restarting with stat
Debugger is active!
Debugger PIN: 236-087-009
Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)

Important: Keep the python run.py command running while you use Lexos. You may minimize the Command Prompt window, but do not close it.

Once you see the message above, you are ready to launch Lexos. Go to a web browser and enter localhost:5000 in the address bar. We recommend using either Firefox or Chrome (other browsers are not supported and may not work with Lexos). You will soon see the Lexos upload page. For information about using Lexos, click the "Gear" icon at the top right of the screen.

Note: Because your computer is acting as both the web server and the user of Lexos, you may need to hit the Reset button in the top right corner of the Upload page to make sure files from any previous sessions are purged.

Quitting Lexos

To quit Lexos simply close your browser window and close the Command Prompt window running python run.py.

Last edited: August 24, 2018 by Scott Kleinman

[1] Anaconda is a free distribution of the Python programming language for large-scale data processing, predictive analytics, and scientific computing, that aims to simplify package management and deployment. As of August 2017, Anaconda includes 720+ of the most popular Python packages, including most of the packages needed for Lexos.