In Matter and Interactions, we will be running vpython programs inside of a web-based datascience tool known and Jupyter Notebooks. While we have these programs installed on the computers in our recitation room, it is much easier if they are installed on your own computer. Fortunately, installation is quite easy. We first will download and install anaconda python, which includes Jupyter Notebooks, then we will add vpython. Download and Install Anaconda PythonThese instrauctions are the same for Windows, Mac and Linux computers. Go to the Anaconda web site and using the Products button at the top-left of the page, select "Undividual Edition". This will take you to a page where if you go to the bottom of the page, you will find links to the downloads "Anaconda Installers" for Python Version 3.8, and then install the package on your computer. Install Vpython on your ComputerThere are similar instructions for all platforms, but we describe them separately here. On Mac and Linux machines, you may need to execute these commands with elevated privlage. You can do this by typing sudu su and entering your password before you start.For Windows ComputersOpen a command prompt on your computer. Typically you get the window under your program menu. In the command window, you can use either conda or pip to install vypthon. Type eitherconda install -c vpython vpython or pip install vpython and then update to the newest version by typing either conda update -c vpython vpython or pip install vpython --upgrade You may also need to install nodejs to allow things to work. To do that, download nodejs from the above length, and then in your command prompt, type the command jupyter labextension install vpython MacOSOpen a terminal window on your Mac using your Finder: (Go)(Utilities)(Terminal), and then in the terminal window, you can use either conda or pip to install vypthon. Type eitherconda install -c vpython vpython or pip install vpython and then update to the newest version by typing either conda update -c vpython vpython or pip install vpython --upgrade LinuxOpen a terminal shell window on your computer, and then you can use either conda or pip to install vypthon. Type eitherconda install -c vpython vpython or pip install vpython and then update to the newest version by typing either conda update -c vpython vpython or pip install vpython --upgrade
Starting a Jupyter NotebookWindowsFrom a windows machine,Wimdows Menu -> Anaconda 3 -> Jupyter Notebook This will open a command prompt window and start a Jupyter Notebook in your browser. If you logout of the notebook in your browser and then close the tab, you will still need to type CTRL C in the command prompt to stop the program. MacThere are two ways to start this. You can use Anaconda-Navigator under Applications. It will open terminal window and start a Jupyter notebook in your browser. You may also want to just open a terminal shell window and start Jupyter Notebooks from there. The advantage of this is you can move to the directory where you are working. Typejupyter notebook which will start a notbook in a tab on your browser. If you log out of that in your browser, you will need to stop the process in the terminal window by typing CTRL C. LinuxOpen a terminal shell window and start Jupyter Notebooks from there. You should move to the directory where you are working before you start the notebook. Typejupyter notebook which will start a notbook in a tab on your browser. If you log out of that in your browser, you will need to stop the process in the terminal window by typing CTRL C. Older versionsInstallion instructions for installing older version of vypthon directly on your computer can be found here. We do not recommend this for use in Matter and Interactions. |