How to install the Python libraries you need for AML 3304 W23 Course Project: Building a Simple Generative AI Language Model

Last edited 69 days ago by Peter Sigurdson
Start by installing the latest Anaconda Distribution.
I will recommend and demonstrate using Visual Studio Code with the Python Extentions. But Pycharm or any other that does the job is fine.

What you should submit for your Coding Project:
Make your project Video using free 30 day Trial Version of Camtasia, and upload to YouTube. Later link into your LinkedIn Blog Post.
Make a team (or individual if Research Paper) TRELLO board to be the Project Management TOOL for your Project: Share / vote on ideas to doing the work. Lets your Team Leader (Peter) monitor and keep track of how your Progress is going).
Both Research Paper writers and Project Coders are going to make a Latex Technical Project Presentation Document.

See the wrapper code to assemble together the Pythonic Tasks you must perform to do this:

What to read after this Tutorial:
The Prof’s Recommendations:
Get the latest version of Anacondo Python: This is the “Data Science” distro of Python.
Step 1: Installing Required Libraries
To install the required Python libraries for your project, you can use pip, the package installer for Python. Open a terminal or command prompt and run the following commands:

pip install tensorflow
Keras is now part of TensorFlow, so you don't need to install it separately. You can import it using TensorFlow as follows:

import tensorflow as tffrom tensorflow import keras

pip install numpy

pip install pandas

pip install matplotlib

If you want to install all the libraries in one command, you can run:

pip install tensorflow numpy pandas matplotlib
If you're using a Jupyter Notebook or Google Colab, add an exclamation mark at the beginning of each command, like this:

!pip install tensorflow numpy pandas matplotlib
After installing the libraries, you can import them in your Python script or notebook as follows:

import tensorflow as tffrom tensorflow import kerasimport numpy as npimport pandas as pdimport matplotlib.pyplot as plt

To check the version of Python installed on your system, open a terminal or command prompt and run:

python --version
If you're using a version of Python older than 3.6, you should update to a newer version. You can download the latest version of Python from the Anacondo website:
If you want to use a specific version of Python or manage multiple Python environments, consider using a tool like pyenv () or creating a virtual environment using venv () or conda () to isolate your project dependencies.
For example, to create a virtual environment using venv:
Open a terminal or command prompt.
Navigate to the directory where you want to create the virtual environment.
Run the following command to create a virtual environment named "env" with Python 3.8 (replace "3.8" with your desired Python version):

python3.8 -m venv env
Activate the virtual environment:
On Linux or macOS:

source env/bin/activate
On Windows:

Now you can install the required libraries as mentioned in the previous answer, and they will be installed only within the virtual environment, isolated from your system Python installation.
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
) instead.