Bleeding-Edge Python on Windows: Overcoming Day-One Setup Hurdles with UV, VS Code, and Git Bash & Gemini AI
Diving into a brand-new major release of a programming language is always exciting, but it comes with a unique set of pioneer challenges. Recently, a few hours ago I embarked on setting up a professional Python development environment on Windows utilizing Git Bash, VS Code, uv, the GitHub CLI (gh), and modern Python libraries like Typer, Rich, and GitPython to build automated command-line tools.
Along the way, I ran into several classic developer roadblocks—from missing binary wheels to environment path mismatches and authentication overrides. Here is a look at the challenges I faced, why they happened, and how I successfully conquered them, with the assistance of Gemini AI. I simply copied & pasted the error messages I got from the terminal into the chat with Gemini AI
1. The Bleeding-Edge Trap: Python 3.15 and Package Compatibility
The Challenge
With the very recent release of Python 3.15.0, developers stepping onto this version gain access to the latest core improvements. However, a brand-new release creates an immediate ecosystem lag: third-party package maintainers have not yet uploaded pre-compiled binary wheels (cp315) to PyPI for every library.
When attempting to install dependencies like PyYAML, pip fell back to building the package from source. Because My Windows lacked the heavy C++ compiler toolchain required to compile those C extensions, the installation failed with a frustrating subprocess error.
The Solution
I unpacked how Windows handles Python versions—realizing that installing a new version installs it side-by-side rather than overwriting older ones. To bypass compilation nightmares without manually downloading Visual Studio C++ Build Tools, I leveraged uv, a lightning-fast Python package and project manager, to streamline execution and environment control.
2. Navigating Shell Environments and Virtual Environment Paths
The Challenge
Moving between different shells (PowerShell vs. Git Bash) and workspace directories introduced a series of path and execution hiccups:
- Command Not Found: Installing
uv via one shell method left it missing from Git Bash's system PATH.
- The
.venv Trap: VS Code occasionally saved working script files (scaffold.py and inspector.py) directly inside the hidden .venv/Scripts/ folder instead of the root project workspace.
- Environment Mismatches: Running standard
python triggered global execution rather than the virtual environment, leading to ModuleNotFoundError for packages like Typer despite them being installed elsewhere.
The Solution
I ironed out a reliable workflow by treating Git Bash and virtual environments with precision:
- Module-Level Execution: When global paths weren't exposed, I invoked
uv directly through the active Python binary (python3.15 -m uv).
- Explicit Targeting: I locked down package installations directly to the virtual environment using
--python .venv/Scripts/python.exe.
- Workspace Hygiene: I located misplaced scripts using file search commands and realigned them to the root
~/WebDevelopment/Python/ directory.
3. The GitHub CLI Authentication Override
The Challenge
With the project scaffolding script (scaffold.py) written to automatically initialize Git repositories and push them live using the GitHub CLI (gh), running a status check revealed an unexpected roadblock:
X Failed to log in to github.com using token (GITHUB_TOKEN)
- The token in GITHUB_TOKEN is invalid.
Even though my Github account (QMS85) was properly saved in the secure system keyring, a stale or rogue GITHUB_TOKEN environment variable was lingering in the active terminal session, overriding the keyring lookup.
The Solution
The fix was wonderfully simple once identified: I had to clear the conflicting shell variable with a single command:
unset GITHUB_TOKEN
Immediately following this, gh auth status successfully recognized the secure keyring credentials, giving our custom automation scripts full, frictionless access to create public repositories and push code straight to GitHub.
Summary: A Production-Ready Workflow
By diagnosing these hurdles methodically, we turned potential frustrations into a robust, high-performance engineering environment:
- Fast Dependency Management: Powered by
uv for lightning-quick package handling.
- Modern CLI Engineering: Leveraging Typer for command-line parsing, Rich for gorgeous terminal UI formatting, and GitPython for repository automation.
- Seamless Version Control: Integrated local Git tracking with automated remote publishing via the GitHub CLI.
Whether you are building internal developer tools or public utilities, setting up a solid foundation ensures that when you code on the bleeding edge, you stay completely in control & You can make use of A.I if you get stuck or need sme debugging assistance....
Have you installed the latest version of Python 3.15??
What challenges have you faced?
Which is your preferred A.I/LLM Tools To Use ???
Have used An AI/LLM to help you with debugging, whilst busy in the terminal???