Building Python API on Windows

23 views
Skip to first unread message

Avijeet Acharya

unread,
May 7, 2026, 12:27:08 AM (8 days ago) May 7
to OpenVSP
Hi,

So far I have been using the Python API by adding :....OpenVSP\python\openvsp\openvsp" to the path and then import vsp, which seems to work fine.
I now tried to build the API properly by using "pip install -r requirements.txt".
All the installation went through smoothly but now I'm getting error as shown in the attached image. Please let me know what i'm doing wrong or what I missed.

On a separate note, is it possible to build using this method for a different python version than the one specified in the installer. For example, right now the latest version, OpenVSP 3.50.1's Windows package is available for 3.11 and 3.13. However, I have a system with python 3.12 (lot of packages are built with this python version, so changing it would be an issue). Is it possible to build the OpenVSP python API using python 3.12? Or installing a parallel python version is the only way out?

Thanks in advance.

Regards
Avijeet Acharya
Python_OpenVSP_Error.png

Rob McDonald

unread,
May 7, 2026, 12:45:49 AM (8 days ago) May 7
to ope...@googlegroups.com
The easiest way to build OpenVSP and the Python API for a custom version of Python is to fork the GitHub repository and then hack the build.yml file.

At the top, there is a build matrix.  It tells GitHub what to build.  Change the Python version there and remove everything you don't want to build.

From this:

jobs:
build:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: [3.11, 3.13]
os: [ windows-2022, ubuntu-24.04, macos-15-intel, macos-14 ]
exclude:
- os: ubuntu-24.04
python-version: 3.11
include:
- os: ubuntu-24.04
gcc-version: 13
- os: macos-15-intel
llvm-version: 16 # AngelScript won't build on Intel Macs with llvm@17 or newer.
- os: macos-14
llvm-version: 18
steps:
- name: Checkout
uses: actions/checkout@v4


To this:

jobs:
build:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: [3.12]
os: [ windows-2022 ]
steps:
- name: Checkout
uses: actions/checkout@v4

Then, name your branch 'build' and push it up to your public fork.

You will need to enable GitHub Actions on your fork.

Then wait about 25 minutes and you'll be able to download a build artifact of the Zip file built with Python 3.12.

You could also install CMake and Visual Studio and everything else on your computer to build it -- but it will certainly take longer that way.  If you only want a different Python, this is the way to go.

Rob




--
You received this message because you are subscribed to the Google Groups "OpenVSP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openvsp+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/openvsp/3a7fe3a0-35a2-41fd-bafd-eabdaf1c0b1fn%40googlegroups.com.

Brandon Litherland

unread,
May 7, 2026, 7:55:04 AM (8 days ago) May 7
to OpenVSP
You may want to try using requirements-dev.txt instead.  

Avijeet Acharya

unread,
May 7, 2026, 8:12:48 AM (8 days ago) May 7
to OpenVSP
Rob,

Thanks for the detailed step-by-step instructions. It worked!!

Brandon,

I'll try it out.

Thanks

Reply all
Reply to author
Forward
0 new messages