Installing Anaconda and the LabBorg Python Module

From PharmWiki
Jump to navigation Jump to search

Computer Systems Tested

  • Windows 10
  • Mac OS Ventura 13.2 (Apple M1)
    • Should work for MaOS >= 11.0.
    • I am trying to get it to work on a MacOS 10.13, but that will take time.

Installation Procedure

  1. Download and Install Anaconda
    1. This takes a while about 10-15 minutes.
    2. Install Anaconda in your user directory and not as administrator.
    3. If you have a Mac with an ARM processor, click the apple and about. It will say either Apple M1 or M2. Use the X86_64.pkg at the end of the Anaconda installer (not the arm64.pkg). At the end, the installer will say that it failed but ignore that.
  2. Open Anaconda Navigator
    1. If it asks for you to update the program, click Yes. When prompted, click Update Now. When it is finished, click Launch Anaconda Navigator.
    2. If you did it correctly, it should look like: Ana23001.png
  3. On the left side, click Ana23002.png
    1. If you did it correctly, it should look like: Ana23003.png
  4. Click the Ana23004.png
  5. In the Create Environment Dialog, put some name like Jupyter37 and be sure that the Python version is 3.7. something.
    1. If you did it correctly, it should look like: Ana23005.png
  6. Click Ana23006.png
    1. This will take a while.
    2. When you are finished, it should look like this: Ana23007.png
  7. Download YYMMDD-Installer.zip from ELC New and put it somewhere where you can find it. The name might be something like 230123-Installer.zip.
    1. You should be able to repeat this procedure for any other versions.
  8. Unzip YYMMDD-Installer.zip. This will produce a folder called Installer.
  9. Put a folder called PHRM8010 on your Desktop or some other location that you can find it.
  10. Navigate to the Installer that you unzipped. In Windows, an Installer directory might be in an Installer directory.
    1. Ultimately, you will get the following folder: Ana23008.png
  11. Navigate to the LabBorg folder, then Examples, and copy the Jupyter Folder and put it into the PHRM8010 directory that you created.
    1. These examples will be useful for you to try out different things in Python.
  12. If the Anaconda program is not already open, open it. Click environments on the left hand side.
  13. Select the environment that you created. In this example, it is Jupyter37.
  14. Click the Ana23009.png and select Open Terminal...
    1. If you did it correctly in Windows, it should look like: Ana23010.png
    2. It should look very similar on a Mac.
  15. Navigate to the Installer folder that you unzipped on the command line.
    1. For Windows, you will use two DOS commands: cd and dir for change directory and list directory, respectively.
    2. For Mac, you will use two Linux commands: cd and ls for change directory and list directory, respectively.
    3. For example, from the command prompt, I typed the following:
      1. cd Downloads
      2. dir
        1. Gives me the following output: Ana23011.png
        2. This command will be ls on the Mac.
      3. cd Installer
        1. Gives me the following output: Ana23012.png
        2. If you only see the directory Installer in Windows, type cd Installer again.
  16. Check to see if setup.py is in the directory list. If it is, type: python setup.py install
    1. If it is working, you should get the following output: Ana23013.png
    2. If this is the first time, installation might take about 30 minutes to complete.
  17. At the end, you should get the following dialog box: Ana23024.png
  18. Select the PHRM8010 folder that you made.
  19. Exit and restart Anaconda Navigator.
  20. Select Environment on the left and the environment that you created. In my case, it was Jupyter37.
    1. If you did it correctly, you should see the following output: Ana23015.png
  21. Select Home
    1. If you did it correctly, you should see the following output:Ana23016.png
  22. Ana23017.pngshould be under the Ana23018.pngIcon. If it is not, restart the Anaconda program.
  23. Click Ana23017.png
  24. JupyterLab should appear like the following in your browser: Ana23019.png

Testing Procedure

  1. Double click the Jupyter folder on the left. If you do not see it, click Ana23020.png
    1. If you did it correctly, you see the following: Ana23019.png
  2. When you double click the Jupyter folder, you should see the following: Ana23021.png
    1. Each of these folders represents a different Python module and they contain short working Jupyter programs.
  3. Now, let us double click on the folder nglview. This Python module allows you to visualize macromolecules.
    1. If you did it correctly, it should look like:Ana23022.png
    2. nglview01, nglview02, nglview03, etc. are folders containing working sample programs.
  4. Double click on nglview01
    1. If you did it correctly, it should look like:Ana23023.png
  5. Double click on Ana23025.png
  6. If you did it correctly, you should get the following: Ana23026.png
  7. At the top left, click Ana23027.png
  8. When get prompted to restart the kernel, click Yes.
    1. If everything is working correctly, you should get the following output: Ana23028.png
  9. rdkit is another Python module to test to see if your install worked properly.
  10. if you want to use the rpy2 Python module, you need to install R and R-studio separately from anaconda..