Skip to content

Fix Windows virtual environment dependency installation (#23) Error handling#24

Open
bhumitnagda wants to merge 2 commits into
SthembisoMfusi:mainfrom
bhumitnagda:error-handling
Open

Fix Windows virtual environment dependency installation (#23) Error handling#24
bhumitnagda wants to merge 2 commits into
SthembisoMfusi:mainfrom
bhumitnagda:error-handling

Conversation

@bhumitnagda
Copy link
Copy Markdown

@bhumitnagda bhumitnagda commented Jan 7, 2026

Description

This PR fixes an issue on Windows where setup.py failed to install dependencies
even though the virtual environment and pip were correctly created.

The problem was caused by invoking pip directly via a relative path
(venv\Scripts\pip), which is not reliably recognized by the Windows shell when
executed using subprocess.

This change ensures dependencies are installed using the virtual environment’s
Python interpreter instead.

Changes

  • Updated setup.py to invoke pip via python -m pip
  • Removed reliance on shell-based pip execution
  • Improved cross-platform reliability for dependency installation

Testing

  • Tested on Windows 11 (version 10.0.26200)
  • Verified virtual environment creation succeeds
  • Confirmed dependencies install correctly using:
python setup.py
venv\Scripts\python -m pip --version

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Related Issue

Fixes #23

Changes Made

  • Updated setup.py to invoke pip via python -m pip
  • Removed reliance on shell-based pip execution
  • Improved cross-platform reliability for dependency installation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]

2 participants