Software Setup for BioAI

This will require about 1.5G of free space on your hard drive.

The instructions below will take you step by step through the process. Important: you must perform these steps from an Administrator-enabled user account on your computer.


Install Gnuplot

Mac

  1. Make sure you are logged into an account on your Mac that has Administrator privileges.

  2. Install XQuartz-2.8.5.pkg. This is the X11 windows system for Mac, which is needed by Gnuplot.

  3. Log out of your user session and log back in (or just reboot your computer). This will ensure that your DISPLAY variable is configured correctly for X11.

  4. Download and unzip gnuplot-5.2.8.zip, and put the unzipped folder on your Desktop.

  5. Open a Terminal window (available in the Utilities folder under Applications) and type the following commands, exactly as shown:

    cd ~/Desktop/gnuplot-5.2.8
    ./configure --with-readline=builtin
    make
    sudo make install   (type in your password)
    

    If you get the message "The make command requires the command line developer tools. Would you like to install the tools now?", go ahead and click Install. After the installation finishes, you should be able to type gnuplot in the Terminal window to start Gnuplot. As a quick test, start Gnuplot and then type the command plot x**2 at the gnuplot> prompt. To exit from Gnuplot, just type quit or exit.

  6. Delete the gnuplot-5.2.8 folder and zip file from your Desktop, as well as the XQuartz-2.8.5.pkg installation file.

Windows

  1. Download and run the installation program gp528-win64-mingw.exe (for 64-bit Windows) or gp526-win32-mingw_2.exe (for 32-bit Windows). Since I don't have a Windows machine, I haven't tried this myself, so I don't know how well it will work, or if it will install everything that you need. But give it a try and let me know how it goes.


Install Miniconda3

  1. Download and run the appropriate installer file for your system:
  2. Open a new Terminal window (close and re-open if already opened). Windows: use the Anaconda Prompt program (available through the Start menu) to open a new Command window.

  3. Test: in Terminal window, type: conda list

  4. Windows only: run the command conda install pywin32. If you are on a Mac or Linux, skip this step.

  5. conda create --name ai python=3.8

  6. conda activate ai

  7. conda info

    Email me the output of the above command.

  8. To start Python using the IDLE interface, make sure your ai environment is activated, and then type idle3 at the command prompt.

  9. Delete the Miniconda3 installer file, which is no longer needed.


Install PyGnuplot

Next, we need to install the Gnuplot Python library, so you can create plots directly from a Python program. Type the following commands in the Terminal window (assuming that you are running Python version 3):

   conda activate ai
   pip install PyGnuplot

You should now be able to type import PyGnuplot at the Python prompt without getting an error message. If you get the prompt back with no error, congratulations, you have a working Gnuplot installation. As a quick test, try running the Python commands below:

>>> import PyGnuplot
>>> fig = PyGnuplot.gp()
>>> fig.c("plot x**2")
>>> fig.c("splot x*y")   (click and drag on the graph with your mouse)

Windows only: If calling PyGnuplot.gp() generates an error message, try calling PyGnuplot.gp("C:\\Program Files\\gnuplot\\bin\\gnuplot.exe") instead.


Install Numpy and Matplotlib

   conda activate ai
   pip install numpy matplotlib

To verify the installation, run the following commands in Python to plot a simple graph:

>>> import numpy as np
>>> import matplotlib.pyplot as plt
>>> x = np.arange(0, 10, 0.2)
>>> plt.plot(x, x**2)
>>> plt.show()

Install Tensorflow

   conda activate ai
   pip install tensorflow

To verify TensorFlow, run the following commands in Python:

>>> import tensorflow as tf
>>> print(tf.reduce_sum(tf.random.normal([1000, 1000])))

Install JupyterLab

   conda activate ai
   pip install jupyterlab

You should now be able to start Jupyter Lab by typing jupyter lab at the command prompt.