layout | title | permalink |
---|---|---|
page |
Setting Up Anaconda |
installation/ |
An important part of PIC16B is navigating the Python package ecosystem. We will do so using the Anaconda distribution of Python. Getting set up with Anaconda is a somewhat detailed process that will require you to briefly use the command line.
You can find installers for Anaconda here. Choose the one appropriate to your operating system.
If installing on macOS, do not install Anaconda in the opt
directory. It is recommended that you install in the folder directly under your username. This is the same folder in which your "Downloads" folder exists.
- Open Anaconda Navigator.
- Navigate to the Environments tab.
- Choose "Create."
- Create a Python 3.7 environment named "PIC16B."
Still in the Environments tab, search for the nb_conda
package on the right-hand side (you may need to update the index).
Check the box beside this package, and then click "Apply" to install.
Follow the same procedure to install the tensorflow
package. This may take some time. While you're here, you may also wish to install some other familiar packages, such as matplotlib
and pandas
. In the future, if you ever attempt to import a package and encounter an error, you should attempt to install it via the Environments tab.
Now go back to the "Home" tab. Launch JupyterLab. You may need to install the app first.
Create a new Jupyter notebook. Change the kernel to the PIC16B environment that you created in Step §2
Selecting the PIC16B environment from within a Jupyter notebook.Type the two lines below into your blank Jupyter Notebook and run them, swapping out my name for yours. If you do not encounter an error, then your setup was successful. Take a screencap of the result and submit it. Otherwise, contact the instructor for assistance.
import tensorflow as tf
print("My name is Phil Chodrow and I installed Anaconda and TensorFlow")