Windows Setup Guide
This tutorial guides you through setting up Windows environment to run vBase samples.
We provide steps for setting up a Python virtual environment (venv) on a Windows 10 system and installing all the necessary build tools required for compiling and installing typical Python packages.
1. Install Python on Windows
If Python is not already installed on your system, follow these steps:
Download Python:
Visit the official Python website and download the latest version of Python for Windows.
Run the Installer:
During installation, check the box that says “Add Python to PATH” at the bottom of the installer.
Select Customize Installation.
Ensure that the following options are selected:
pip
(Python package manager)venv
(Virtual environment support)
Finish Installation and verify Python is installed:
Open Command Prompt and run:
You should see the installed Python version.
2. Install Microsoft Visual C++ Build Tools
Many Python packages require compilation using Microsoft Visual C++ Build Tools.
Download Microsoft Visual C++ Build Tools:
Go to the Visual Studio Build Tools page and download the installer.
Install the C++ Build Tools:
In the installer, select the “Desktop development with C++” workload.
Ensure the following components are selected:
MSVC v142 - VS 2019 C++ x64/x86 build tools
Windows 10 SDK
Finish Installation and allow the tools to install.
3. Create the Project Directory
These instructions assume that the samples will be located in the C:\Users\%USERNAME%\Projects\validityBase\vbase-py-samples
folder.
Create the project folder and switch to it:
4. Clone vBase Samples into the Project Directory
Samples can be cloned using git
or downloaded and extracted as a ZIP file.
4.1. Option 1. Clone the vbase-py-samples repository
If you have git
installed, clone the vbase-py-samples
repository using the command line:
4.2. Option 2. Download the vbase-py-samples repository as a ZIP file
On Windows 10, the easiest way to clone a GitHub repository without installing additional software is to use GitHub’s built-in Zip download feature. This method allows you to download the repository as a ZIP file and extract it, effectively “cloning” the repository without requiring Git or any command-line tools.
Go to the GitHub Repository:
Open your web browser and navigate to the GitHub repository page: https://github.com/validityBase/vbase-py-samples
Download as ZIP:
On the repository’s main page, click the green Code button.
In the dropdown, select Download ZIP. This will download the entire repository as a ZIP file.
Extract the ZIP File:
Once downloaded, locate the ZIP file (usually in your Downloads folder).
Right-click on the ZIP file and select Extract All….
Choose a destination folder, such as the samples folder
C:\Users\%USERNAME%\Projects\validityBase\vbase-py-samples
, and extract the contents.
5. Create a Python Virtual Environment (venv)
Open Command Prompt (or PowerShell) and navigate to your project folder:
Create a virtual environment using the
venv
module:This creates a folder called
venv
in your project directory, which will contain the virtual environment.Activate the virtual environment:
You should now see
(venv)
at the beginning of your command line, indicating that the virtual environment is active.
6. Install Required Build Tools for Python Packages
Some packages need additional Python build tools like setuptools
and wheel
. Install these tools globally in your virtual environment:
Upgrade
pip
,setuptools
, andwheel
:Install
build
: Thebuild
package helps when building some Python projects.
7. Install vBase Dependencies
Now that the virtual environment and build tools are set up, you can install the vBase dependencies:
Change to the project folder using Command Prompt or PowerShell navigate to the
vbase-py-samples
project folder:Instal dependencies: The
vbase-py-samples
project comes with itsrequirements-win.txt
. This installs the required pre-built packages available for Windows:
8. You Are All Set!
Once the above pip install
command succeeded, you are ready to run the samples.
Last updated