From bab5fd11aaa069514ceb211849b34a576b60d05a Mon Sep 17 00:00:00 2001 From: Edward Donner Date: Mon, 13 Oct 2025 09:49:23 -0400 Subject: [PATCH] Better uv troubleshooting --- setup/SETUP-new.md | 26 +++++++------------------- setup/troubleshooting.ipynb | 20 +++++--------------- 2 files changed, 12 insertions(+), 34 deletions(-) diff --git a/setup/SETUP-new.md b/setup/SETUP-new.md index a0417b6..a3bf71a 100644 --- a/setup/SETUP-new.md +++ b/setup/SETUP-new.md @@ -128,34 +128,22 @@ 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](https://edwarddonner.com/faq) for the fix to this common Mac configuration issue. +Any problems with uv installation or using uv, please see [Q11 on my FAQ page](https://edwarddonner.com/faq/#11) for a full briefing. ### 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: +uv should install everything blazingly fast. Any problems, please see [Q11 on my FAQ page](https://edwarddonner.com/faq/#11). -- First thing to try is this: -`uv python pin 3.11` and then `uv sync` again. -- If you get an error about missing wheels for torch (Intel Mac people, you might get this), then: -`uv python pin 3.11` then `uv add torch==2.2.2 torchvision==0.17.2 torchaudio==2.2.2` then `uv sync` +You now have a full spec environment!! -- 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!! +Using uv is simple and fast: +1. Instead of `pip install xxx` you do `uv add xxx` +2. You never need to activate an environment - uv does it for you. +3. Instead of `python xxx` you do `uv run xxx` ___ diff --git a/setup/troubleshooting.ipynb b/setup/troubleshooting.ipynb index 71abd54..8c2d514 100644 --- a/setup/troubleshooting.ipynb +++ b/setup/troubleshooting.ipynb @@ -11,7 +11,9 @@ "\n", "Setting up a Data Science environment can be challenging because there's a lot going on under the hood. But we will get there.\n", "\n", - "And please remember - I'm standing by to help out. Message me or email ed@edwarddonner.com and I'll get on the case. The very last cell in this notebook has some diagnostics that will help me figure out what's happening.\n" + "And please remember - I'm standing by to help out. Message me or email ed@edwarddonner.com and I'll get on the case. The very last cell in this notebook has some diagnostics that will help me figure out what's happening.\n", + "\n", + "You might want to have a quick look at the [faq](https://edwarddonner.com/faq) on my homepage in case your problem is specifically addressed.\n" ] }, { @@ -46,21 +48,9 @@ "3. In the field \"Path to folder with a list of Virtual Environments\" put the path to the project root, like C:\\Users\\username\\projects\\llm_engineering (on a Windows PC) or /Users/username/projects/llm_engineering (on Mac or Linux). \n", "And then try again.\n", "\n", - "## 3. Anaconda interference and Python version horrors\n", + "## 3. Any uv problems\n", "\n", - "Having problems with missing Python versions? Have you ever used Anaconda before? It might be interferring. Quit Cursor, bring up a new command line, and make sure that your Anaconda environment is deactivated: \n", - "`conda deactivate` \n", - "And if you still have any problems with conda and python versions, it's possible that you will need to run this too: \n", - "`conda config --set auto_activate_base false` \n", - "And then start a new Terminal / Powershell. \n", - "and then from within the agents directory, you should be able to run `uv python list` and see the Python 3.12 version. \n", - "And this shouldn't be required, but if you want to be absolutely careful, then now: \n", - "1. Delete the folder called '.venv' in the project root directory \n", - "2. `uv python uninstall 3.12`\n", - "3. `uv python install 3.12`\n", - "4. `uv python list`\n", - "5. `uv sync` \n", - "And surely that is bulletproof!" + "Please check out this comprehensive guide on my [FAQ Q11](https://edwarddonner.com/faq/#11)" ] }, {