13 KiB
LLM Engineering - Master AI and LLMs
New Setup instructions for PC, Mac and Linux
These are the Setup instructions for the new version of the course as of October 2025. For the original versions (Anaconda) please see the other files in this directory for your platform.
If you're looking at this in Cursor, please right click on the filename in the Explorer on the left, and select "Open preview", to view the formatted version.
Welcome, LLM engineers in the making!
I should confess up-front: setting up a powerful environment to work at the forefront of AI is not as simple as I'd like. For most people these instructions will go great; but in some cases, for whatever reason, you'll hit a problem. Please don't hesitate to reach out - I am here to get you up and running quickly. There's nothing worse than feeling stuck. Message me in Udemy or email me and I will unstick you quickly!
Email: ed@edwarddonner.com
LinkedIn: https://www.linkedin.com/in/eddonner/
Step 0 - Before we begin - addressing the "GOTCHAS" which trip up many people:
Ignore this section at your peril! 80% of the questions I get about setup are solved by these very common system issues.
-
PC people: Permissions. Please take a look at this tutorial on permissions on Windows. If you ever have an error that you don't have the rights / permissions / ability to run a script or install software, then read this first. ChatGPT can tell you everything you need to know about Permissions on Windows.
-
Anti-virus, Firewall, VPN. These can interfere with installations and network access; try temporarily disabling them as needed. Use a hotspot on your phone to prove whether it's a network issue.
-
PC people: The evil Windows 260 character limit to filenames - here is a full explanation and fix!
-
PC people: If you've not worked with Data Science packages on your computer before, you might need to install Microsoft Build Tools. Here are instructions. A student also mentioned that these instructions might be helpful for people on Windows 11.
-
Mac people: If you're new to developing on your Mac, you may need to install XCode developer tools. Here are instructions.
-
SSL and other network issues due to Corporate Security: if you ever get issues with SSL, such as an API Connection issue or any certificate issue, or an error trying to download files from Ollama (a Cloudflare error) then see Q15 here
STEP 1 - installing git, projects directory, Cursor
This is the only section with separate steps for PC people and Mac/Linux people! Please pick your section below, then reconvene for Step 2...
STEP 1 FOR PC people:
- Install Git (if not already installed):
- Open a new Powershell Prompt (start menu >> Powershell). If you ever have permissions errors, try opening the Powershell by right clicking and selecting "run as Administrator"
- Run the command
gitand see if it responds with details of the command or an error - If you get an error, download Git from https://git-scm.com/download/win
- Run the installer and follow the prompts, using default options (press OK lots of times!)
- Create projects directory as needed
- Open a new Powershell prompt, as in prior step. You should be in your home directory, like
C:\Users\YourUserName - Do you have a projects directory? Find out by typing
cd projects - If that has an error, then create a projects directory:
mkdir projectsthencd projects - Now you should be in
C:\Users\YourUserName\projects - You can locate this anywhere convenient for you, but avoid any directories that are on your OneDrive
- Do a git clone:
Enter this in the command prompt in the Projects folder:
git clone https://github.com/ed-donner/llm_engineering.git
This creates a new directory llm_engineering within your projects folder and downloads the code for the class.
Do cd llm_engineering to go into it. This llm_engineering directory is known as the "project root directory".
- Cursor Install Cursor if needed and open the project:
Visit https://cursor.com
Click Download for Windows. Then run the installer. Accept and pick defaults for everything..
Then go to Start menu, enter cursor. Cursor will come up, and you might need to answer questions. Then you should see the 'new window' screen where you can click "Open Project". If not, go to File menu >> New Window. Then click "Open Project".
Find your llm_engineering directory within your projects directory. Double click on llm_engineering so you're looking at the contents of llm_engineering. Then click Open or Open Folder.
Cursor should then open up llm_engineering. You know you're in good shape if you see LLM_ENGINEERING in block caps on the top left.
STEP 1 FOR MAC/LINUX PEOPLE
- Install Git (if not already installed):
Open a Terminal: on Mac, open a Finder window, go to Applications >> Utilities >> Terminal. On Linux, you people live in Terminals.. you hardly need instructions from me!
- Run
git --versionand you should see a git version number. If not, you should get instructions on how to install it, or follow gotcha #5 at the top of this doc.
- Create projects directory as needed
- Open a new Terminal window, as in prior step. Type
pwdto see where you are. You should be in your home directory, like/Users/username - Do you have a projects directory? Find out by typing
cd projects - If that has an error, then create a projects directory:
mkdir projectsthencd projects - If you now do
pwdyou should be in/Users/username/projects - You can locate this anywhere convenient for you, but avoid any directories that are on your icloud
- Do a git clone:
Enter this in the command prompt in the Projects folder:
git clone https://github.com/ed-donner/llm_engineering.git
This creates a new directory llm_engineering within your projects folder and downloads the code for the class.
Do cd llm_engineering to go into it. This llm_engineering directory is known as the "project root directory".
- Cursor Install Cursor if needed and open the project:
Visit https://cursor.com
Click Download for Mac OS. Or Linux. Then run the installer. Accept and pick defaults for everything..
Then go to Start menu, enter cursor. Cursor will come up, and you might need to answer questions. Then you should see the 'new window' screen where you can click "Open Project". If not, go to File menu >> New Window. Then click "Open Project".
Find your llm_engineering directory within your projects directory. Double click on llm_engineering so you're looking at the contents of llm_engineering. Then click Open.
Cursor should then open up llm_engineering. You know you're in good shape if you see LLM_ENGINEERING in block caps on the top left.
STEP 2: Installing the fabulous uv then doing a uv sync
For this course, we're using uv, the blazingly fast package manager. It's really taken off in the Data Science world -- and for good reason.
It's fast and reliable. You're going to love it!
First, within Cursor, select View >> Terminal, to see a Terminal window within Cursor. Type pwd to check you're in the project root directory.
Now type uv --version to see if uv is installed. If you get a version number, then terrific! But if you get an error, then follow the instructions here to install uv - I recommend using the Standalone Installer approach at the very top, but you can use any approach. Run commands in the Cursor installer. If one approach doesn't work for you, then try another.
https://docs.astral.sh/uv/getting-started/installation/
Once you've installed uv, you need to open a new terminal window in Cursor (the plus sign or Ctrl+shift+backtick) for uv --version to work. Please check!
Mac people: if you hit a problem with not having permissions to edit your profile files, please see Q14 here for the fix to this common Mac configuration issue.
Now that it's installed:
Run uv self update to make sure you're on the latest version of uv.
One thing to watch for: if you've used Anaconda before, make sure that your Anaconda environment is deactivated
conda deactivate
And if you still have any problems with conda and python versions, it's possible that you will need to run this too:
conda config --set auto_activate_base false
And now simply run this:
uv sync
uv should install everything blazingly fast. If you hit any installation errors:
-
First thing to try is this:
uv python pin 3.11and thenuv syncagain. -
If you get an error about missing wheels for torch (Intel Mac people, you might get this), then:
uv python pin 3.11thenuv add torch==2.2.2 torchvision==0.17.2 torchaudio==2.2.2thenuv sync -
If you get an error about "invalid certificate" while running
uv sync, then please check Gotcha 6 above, and try this instead:
uv --native-tls sync -
And also try this instead:
uv --allow-insecure-host github.com sync
And other problems - message me.
But if no problems - you now have a full spec environment!!
STEP 3 - OPTIONAL - Set up OpenAI Account
Alternative: see Guide 9 in the guides folder for free alternatives!
Go to https://platform.openai.com
- Click Sign Up to create an account if you don't have one. You might need to click some buttons to create an Organization first - just put in sensible defaults. See Guide 4 in the Guides folder if you're unsure about the differences between ChatGPT and the OpenAI API.
- Click on the Settings icon on the top right, and then Billing on the left sidebar navigation.
- Ensure Auto-Recharge is off. As needed, "Add to Credit Balance" and pick the $5 up-front payment amount, be sure that you add a proper payment method
- Still in Settings, select API keys in the left sidebar (near the top)
- Press "Create new secret key" - select "Owned by you", give it any name you want, for the project select "Default project", leave Permissions at All
- Press "Create secret key" and you should see your new key. Press Copy to copy it into your clipboard.
STEP 4 - needed for any model like OpenAI or Gemini, but not needed if you only use Ollama - create (and SAVE) your .env file
Be dilligent with this section! - any mistakes with your key will be very hard to track down!! I get a huge volume of questions from students who make a mistake with one of these steps... Above all, remember to save the file after you change it.
- Create your
.envfile
- Go back to Cursor
- In the File Explorer on the left, right click in the blank space at the bottom of all your files, select "New File" and call your file
.env - I can't stress this enough: the file needs to be called PRECISELY
.env- those four characters, no more and no less. Not ".env.txt" and not "john.env" and not "openai.env" and not anything else! And it needs to be within the project root.
If you're wondering why I rant about this: I get many, many frustrated people contacting me who (despite all my appeals) have named the file something else and think it's OK. It's not OK! It needs to be called .env in the llm_engineering directory 😂
- Populate your
.envfile and then Save it:
Select the file on the left. You should see an empty blank file on the right. And type this into the contents of the file in the right:
OPENAI_API_KEY=
And then press paste! You should now see something like this:
OPENAI_API_KEY=sk-proj-lots-and-lots-of-digits
But obviously with your actual key there, not the words "sk-proj-lots-and-lots-of-digits"..
Now be sure to SAVE the file! File >> Save or Ctrl+S (PC) or Command+S (Mac). Many people forget to Save. You need to Save the file!
You should see a Stop sign by the .env file - don't be concerned.. this is a good thing! See Q7 here if you want to understand why.
__
STEP 5 - Install Cursor Extensions, Open Day 1, Set the Kernel and GO!
(If you are prompted in Cursor to install recommended extensions, just say yes! That is a nice shortcut for this step.)
- Go to view menu and select Extensions.
- Search for "python" to bring up the Python extensions. Select the Python extension made by "ms-python" or by "anysphere" and install it if not already installed.
- Search for "jupyter" and select the extension made by "ms-toolsai" and install it if not already installed.
Now go to View >> Explorer. Open the week1 folder, and click on day1.ipynb.
- See where it says "Select Kernel" near the top right? Click that.. then pick "Python Environments"
- Pick the top option with a star that should say something like
.venv (Python 3.12.x) .venv/bin/python Recommended - If this doesn't come up, please go to the troubleshooting lab in the Setup folder.