Installation issues python api

682 views
Skip to first unread message

Tim Schuhmann

unread,
Apr 12, 2022, 5:37:07 PM4/12/22
to OpenVSP
Hey everyone, 

I have installed the python api using the readme file, once I try to run the test.py file it says: ModuleNotFoundError: No module named 'openvsp'. Although I ran it with the newly generated environment named vsppytools.

I have then tried to use the video by Jose by creating the environment manually, this also wasn't successful. I need to install this in order to use Suave and OpenVSP in my master Thesis so I would be very thankful if someone could help me solve this issue. 

Best regards,
Tim

Brandon Litherland

unread,
Apr 12, 2022, 8:52:27 PM4/12/22
to OpenVSP
Are you using an IDE or just calling the API from Suave?

Tim Schuhmann

unread,
Apr 19, 2022, 5:57:35 PM4/19/22
to OpenVSP
I am using an IDE but, an anaconda environment which is created with the installation script. 

Haoliang Yu

unread,
Apr 20, 2022, 10:25:48 AM4/20/22
to OpenVSP
Hi,Tim
I have just success run python api, when I use it at first, I find it is a little strange. I have the same error as you show at first  ModuleNotFoundError: No module named 'openvsp'.
What is your computer system?
I use Windows 10 and I try to copy some thing into the conda create environment. And it can run.
At first, I run "python set up.py bulid" and   "python set up.py install" in four vsp python api folder.
And then I copy some folder into my python environment.
These are folders which need to copy.
LW@[CS0P9C8P2_TQJ20LCSS.png3J9UM@4%_UJX]@XD1P5C1$E.png
For example my environmet address is that:C:\Users\WinterGarden\.conda\envs\suave2.5.2py3.9\Lib\site-packages
So I copy these folders which is marked, from vsp python api folder to my python environment.
So, suave can run with openvsp.
I wish this may help you.

Knight

Tim Schuhmann

unread,
May 2, 2022, 10:18:36 AM5/2/22
to OpenVSP
Hi Knight and all of the community,

thanks for your detailed answer. Did you create the  suave2.5.2py3.9 manually in Anaconda? Because the SUAVE packages are installed just fine. If I follow the instructions of the README file I get no issues when wanting to import SUAVE. The only issue that arises is when the 'import openvsp as vsp' is used, like in the testfile under the following folder structure wihtin OpenVSP: OpenVSP-3.27.1-win64\python\openvsp\openvsp\tests\test.py. I want to test if openvsp is installed correctly but when running this python script I get the following error message:
Unbenannt.JPG
The vsppytools environment is installed using the './setup.ps1' command in a powershell window. The README for this openVSP version has the following instructions:
Unbenannt.JPG
The only issue I see here is that I downloaded the version for python 3.9 but the vsppytools environment that is created with the instructions in the README file is version 3.6. 
Unbenannt.JPG
Could this be the reason why I get the error message 'DLL load failed: the module was not found'?

Maybe I would manually have to install an environment using the video of Jose Alfredo Rosas ((306) How to Install the OpenVSP Python API - YouTube) or alternatively try the  OpenVSP-3.27.1  python 3.6 version. 

I hope someone can help me with a fix. I have already reinstalled anaconda again to have a fresh start but I can't find the issue.

Thanks,
Tim

Brandon Litherland

unread,
May 2, 2022, 1:45:09 PM5/2/22
to OpenVSP
Similar issues here: https://groups.google.com/g/openvsp/c/E7yI309t374/m/hUDjTZPLAAAJ 
Try opening your Python 3.9 IDE or console and running "pip install -r requirements-dev.txt" (it's the third line of setup.ps1).  That should build the OpenVSP API in the version you use to run the command, I think.  Not sure why this keeps coming up but I should look into it.

-Brandon

Haoliang Yu

unread,
May 3, 2022, 1:46:42 AM5/3/22
to OpenVSP
Hi, Tim
I know that you want to use SUAVE and OpenVSP  in your master Thesis. So I want to stress something which I think is important.
Firstly, Anaconda is needed and you have installed it.
Secondly, I install suave and openvsp manually, in order to make both of them run correctly.
Details as follows:
1.You can see that there are many environment in this folder.
WGAWLZZ)0AIFWVMF(7YFR6L.png
All of these are created by anaconda.
So we can create environment in cmd.
And, I think install them manually is good for us.
standard create environment form is :

conda create -n environmentname python=versionname

So, open cmd and type: 
)O9X$MGCI3]308QG@EK{@T.png
and when ask you to input [y/n], type y and enter.
2N29HIMC5(O~4YE)F[JB4.png
success create environment.
And then activate this environment.

conda activate environmentname
so 
]E@MQAVZC48(H5_)}K1)SW.png
and then 
$N(08BR}EWDUY}TRZX{}(31.png
next we can jump into suave trunk folder
U(WS0TGCKCP6A3I%R)6MC.png
and type:
N_L2P_EK8EF$1OAYO93LT~7.png
if install SUAVE successful. It will show that:
_{Y8(}%Y]XF$LYCPQI383IR.png
And this is really successful install for SUAVE.

Haoliang Yu

unread,
May 3, 2022, 1:47:17 AM5/3/22
to OpenVSP
2.So want about openvsp? I think that openvsp is need to install into the same python environment, so you can use both to set up a airplane.
For example, I have create environment "suave " and site-packages show all python package
AAB13L@44PWAYCR0}MSXQ7J.png
You can find that SUAVE 2.5.2 packeage in this folder.
F]M}(RNWB6EJ_%Q8$%KLKI9.png
I think that Python api means that Python package is install successsful in site-packages folder.
So you can see the package is attached as follows:
vsp_python_api_doc.zip
but I need to tell you that this package openvsp is 3.26.1 which I use for openvsp python api, I do not know if it is ok. Because that the new version is 3.27.1
I suggest that you use openvsp python api 3.26.1 together with suave2.5.2, they are fit.
JHN)(JW7ITK@LS6T3B1GNH.png
you can copy these eight folders into the folder which I have mentioned before.
AAB13L@44PWAYCR0}MSXQ7J.png
and you can check python packages in pycharm.
%N~FZ5)15E5YBOY6Z[BQ%N7.png
four red rectangular box shows that openvsp python api is ok.
one blue rectangular box shows that suave package is ok.
And if you want to check test.py, it also will be right without error.

So these all details that I have done.
And then my suave and openvsp can use together.
For example I can run the tutorial: BWB.py and add some codes to write airplane.
WQ%LF6[[%JH4NJV~$I$G%9.png
and you can find base.vsp3 in this folder.
5MGLXPK]4FV)@DL%X5KW)V.png
all result are as follows:
4EC685D3648F1A8127EDEA182024BFD3.png
must remember that: 
if cmd: activate environment before  use it 


if IDE:  use the environment you create for suave and openvsp
for example: Pycharm
 ~6GXTBCY9%KKMHO0KU]5C]Q.png
my environment name is suave2.5.2py3.9 , you can use many name according to your habit when you create it.

Knight

Haoliang Yu

unread,
May 3, 2022, 2:09:35 AM5/3/22
to OpenVSP
and this package is 10MB, I can't send it in forum.
if you need, please give me your email.
V0]V]Q82K)6_C17RS(M~RQH.png
Besides, 

Try opening your Python 3.9 IDE or console and running "pip install -r requirements-dev.txt" (it's the third line of setup.ps1).  That should build the OpenVSP API in the version you use to run the command, I think.  Not sure why this keeps coming up but I should look into it.
I have try it before, but something error with it.
All document in my package is by the method which Brandon has told.
And I copy these folder to environment ,everything is OK.
So I think copy folders is a better choice after do this.

Tim Schuhmann

unread,
May 3, 2022, 10:29:35 AM5/3/22
to OpenVSP
Hello,

thank you so much for the instructions! I should have just done it manually from the beginning, I guess running the  "pip install -r requirements-dev.txt" made the difference. Its now working fine. 

Best regards,
Tim

Cornelius Kauffmann

unread,
May 30, 2022, 10:42:22 AM5/30/22
to OpenVSP
Hello  Knight,

thank you so much for this! I just followed your tutorial and now everything works fine. I tried so many things last year to make it possible, but it never worked until now. You just made my day :D

Best,
Cornelius

Haoliang Yu

unread,
May 30, 2022, 10:50:50 AM5/30/22
to OpenVSP
You're welcome.
To be honest, it took me nearly one month to build the Python API of OpenVSP successfully, and there are always inexplicable errors.
I put what I think is the best way to present it in the content of the email above.
I'm glad I can help you.

Best regards,
Knight
Reply all
Reply to author
Forward
0 new messages