OpenVSP 3.24 installation with python API (Windows)

935 views
Skip to first unread message

Cornelius Kauffmann

unread,
Jul 19, 2021, 6:01:25 AM7/19/21
to OpenVSP
Hi everyone,

I am currently trying to install OpenVSP 3.24 with the python API for use with SUAVE. Im am using anaconda with spyder and tried the installation steps in the README file using windows powershell. I have read the other threads on the subject and have also tried using python 3.6 in a new environment, but I still get the same error:

(vsppytools) PS C:\Users\corne\OpenVSP-3.24.0-win64\python> python
Python 3.6.13 (default, Feb 19 2021, 05:17:09) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import vsp
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\corne\OpenVSP-3.24.0-win64\python\openvsp\openvsp\vsp.py", line 15, in <module>
    import _vsp
ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.

I'm stuck on this now since days, can someone help me there? Thanks in advance!

Cornelius
Message has been deleted

jvgr...@gmail.com

unread,
Jul 19, 2021, 4:15:08 PM7/19/21
to OpenVSP
This error message usually means you do not have the correct Python version, which should be 3.6 if using the API distributed with OpenVSP. However, that doesn't seem to be the case based on your description and the error message. It is possible that the CI script failed to use Python 3.6 as specified since we recently made a few changes there. Have you been able to install any of the previous versions of the API or is this your first time?

Can you try calling "import openvsp as vsp" instead? That is what the library is named on my system.

Have you looked at the OpenVSP API & MATLAB/Python Integration presentation from the 2020 Workshop? You might want to review it in case there is something you've missed. I suggest using the "requirements-dev" file when installing.

Alternatively, you can compile OpenVSP yourself to avoid any Python version issues. The presentation before it covers how to compile OpenVSP on Windows. 

-Justin 

Cornelius Kauffmann

unread,
Jul 20, 2021, 6:41:32 AM7/20/21
to OpenVSP

Hello Justin, thank you for your help!

I have completely uninstalled Anaconda3 again and installed Anaconda3 version 5.2.0 with Python 3.6 (like mentioned in this video). This is my Anaconda Path: C:\ProgramData\Anaconda3 and this is my OpenVSP Path: C:\Users\corne\OpenVSP-3.24.0-win64\python . When I tried to install OpenVSP Version 3.23 I got the same Error, so I wasn't able to install any previous version of the API before. This was the error again:

  File "c:\users\corne\openvsp-3.23.0-win64\python\openvsp\openvsp\vsp.py", line 13, in <module>
    from . import _vsp

ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.

I also tried import openvsp as vsp which lead to the same error.

I even tried to compile OpenVSP myself according to this video. All steps worked fine except the last step where you had to select the local windows debugger to run OpenVSP in Visual Studio 2017. The errors I got were these in the attached picture (Sorry for the german text, it's basically giving me Syntax errors). 

I read in some threads that I have to copy the _vsp file into the python folder. I copied it into the site packages  folder  (C:\ProgramData\Anaconda3\Lib\site-packages) and it is also located in the OpenVSP folder (C:\Users\corne\OpenVSP-3.24.0-win64\python\openvsp\openvsp) but this still didn't help.

Sorry for this mass of information, I really hope this is not too confusing.

Cornelius

Screenshot 2021-07-20 120328.png

jvgr...@gmail.com

unread,
Jul 22, 2021, 6:01:19 PM7/22/21
to OpenVSP
I'm still not sure what could be causing your issue unfortunately so I'm not sure what else I can suggest. 

It's also hard to say what isn't working in your build process. It might be an issue with an incorrect version of the Visual Studio C++ compiler, difference in CMAKE_BUILD_TYPE between the libraries and VSP, or a handful of other details. I'd review the PowerPoint slides with the presentation you referenced and double check you haven't missed anything. 

Hopefully someone else with a similar issue can help provide a recommendation. 

-Justin 

Cornelius Kauffmann

unread,
Jul 24, 2021, 3:19:38 AM7/24/21
to OpenVSP
Hi Justin, thank you anyway for your help! 

Cornelius

Chris Silva

unread,
Jul 26, 2021, 12:33:10 PM7/26/21
to OpenVSP
Looks like 2 issues here. First issue is that both the Windows 64 bit and MacOS builds are Python 3.9 (despite the filenames). Second issue is that the install script isn't putting the _vsp.pyd file into the openvsp folder when installing (at least on Windows). 

I have both MacOS and Win64 installs of OpenVSP 3.24.0 responding correctly to "import openvsp as asp" on Python 3.9 64-bit. But I did need to move the _vsp.pyd file over on Windows. 

Rob McDonald

unread,
Jul 26, 2021, 2:30:46 PM7/26/21
to OpenVSP
Thanks Chris,

We (somewhat) recently changed our build servers -- and it seems that we're having trouble getting it to build with the Python version we tell it to...

Thanks for helping to figure this out.

Rob

jvgr...@gmail.com

unread,
Jul 26, 2021, 4:31:32 PM7/26/21
to OpenVSP
Thanks Chris and apologies for the issues with the Python version. I was confident that our build script was doing what we are telling it to do but apparently that still isn't the case. I'll make sure we get it right for this next release. 

I'll also try to update the installation scripts to copy over the _vsp.pyd file. 

-Justin 

José Alfredo Rosas

unread,
Aug 4, 2021, 10:36:37 AM8/4/21
to OpenVSP
Hello Chris:

I am also trying to solve this problem with the windows installation. I alredy have the vsppytools  conda enviroment but I get the same problem as Cornellius. What folder do I need to move the _vsp.pyd file to for it to work properly?

Thanks in advanced, 
José

Sam

unread,
Aug 12, 2021, 11:28:31 AM8/12/21
to OpenVSP
Hi,

I have the same problem. Everytime I run the BWB.py tutorial I get the message "VSP import failed". I am using SUAVE 2.4.0 and already tested it with OpenVSP 3.24 (with python 3.9) as well as OpenVSP 3.25 (with python 3.6). 
The conda environment vsppytools is activated. SUAVE and OpenVSP are listed there (by "conda list") and can be imported to Python. 

My normal procedure is as follow:
- activate vsppytools
- navigate to: C:\Users\..\Documents\06_SUAVE\Tutorials-2.4.0\BWB_CFD
- run file: python BWB.py

Following, that the _vsp.pyd file is important, I saved a special version of the tut_mission_B737.py file (changed according to Export geometry of B737 tutorial to OpenVSP (google.com) to get a vsp-File) in this directory: 
C:\..\OpenVSP-3.25.0-win64\python\openvsp\openvsp

When running it there, I get the following message:

Reseting OpenVSP Model in Memory
VSPAERO solver not found in C:\ProgramData\Miniforge3\envs\vsppytools.
VSPAERO viewer not found in C:\ProgramData\Miniforge3\envs\vsppytools.
VSPAERO slicer not found in C:\ProgramData\Miniforge3\envs\vsppytools.
Writing main_wing to OpenVSP Model
Writing horizontal_stabilizer to OpenVSP Model
Writing vertical_stabilizer to OpenVSP Model
Writing turbofan to OpenVSP Model
Traceback (most recent call last):
  File "C:\ProgramData\Miniforge3\envs\vsppytools\lib\site-packages\suave-2.4.0-py3.6.egg\SUAVE\Core\Data.py", line 59, in __getattribute__
    return dictgetitem(self,k)
KeyError: 'inlet_diameter'

I know that's not the way to go ;) But it seems like SUAVE is now able to import VSP. 
Has anyone an idea to fix it? Is my normal procedure the correct way?

best regards,
Sam

deenri...@gmail.com

unread,
Aug 10, 2022, 10:16:52 PM8/10/22
to OpenVSP
I recently downloaded OpenVSP 3.29 Python 3.9

On Windows, I ran the setup.ps1 file in the python sub-directory. 

When trying to import openvsp, I received the fabled "DLL load failed"

Turns out, the environment.yaml file called by setup.ps1 was setting up and environment with python 3.6. So I had to manually change this value to 3.9. Everything worked great after that. Just an fyi for others. 

Reply all
Reply to author
Forward
0 new messages