Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing vsp.py file #212

Open
sreyese opened this issue Nov 11, 2021 · 8 comments
Open

missing vsp.py file #212

sreyese opened this issue Nov 11, 2021 · 8 comments

Comments

@sreyese
Copy link

sreyese commented Nov 11, 2021

I'm trying to compile python openvsp but it's giving me this error, I couldn't find the file anywhere

import openvsp
Traceback (most recent call last):
File "", line 1, in
File "/OpenVSP-main/src/python_api/packages/openvsp/openvsp/init.py", line 1, in
from .vsp import *

@sreyese sreyese closed this as completed Nov 12, 2021
@sreyese sreyese reopened this Nov 12, 2021
@justingravett
Copy link

Have you taken a look at the 2020 Workshop Presentation about how to setup the Python API? You might see something that you missed when setting it up. Also to note is that the last few versions of OpenVSP mistakenly wrapped the API with Python 3.9. I believe this has been fixed in 3.25.0 but am not 100% sure. It will definitely be fixed by the next release, but just something to be aware of if that is causing your issue.

@huyidao625
Copy link

The Python version must be the same as what OpenVSP was compiled with. For instance OpenVSP 3.21.2 Win64 requires Python 3.6-x64. If a different verison of Python is desired, the user must compile OpenVSP themselves. Python API Instructions

@iiwolf
Copy link

iiwolf commented Jan 14, 2022

I'm having the same issue (Ubuntu 18.04)

Traceback (most recent call last):
  File "/home/ijw/projects/N221-004/OpenVSP/src/python_api/packages/../test.py", line 4, in <module>
    import openvsp as vsp
  File "/home/ijw/projects/N221-004/OpenVSP/src/python_api/packages/openvsp/openvsp/__init__.py", line 1, in <module>
    from .vsp import *
ModuleNotFoundError: No module named 'openvsp.vsp'

I have followed the instructions and tried with both Python 3.6 and 3.9 because it wasn't clear to me which 3.26.1 used.

@iiwolf
Copy link

iiwolf commented Jun 30, 2022

In my case this issue was the result of trying to pip install in the source directory instead of the install directory:

/home/usr/openvsp/repo/src/python_api/packages

Instead the install location:

/usr/local/python

@luzpaz
Copy link
Contributor

luzpaz commented Oct 18, 2024

Should this be notated or fixed somewhere to avoid for posterity ?

@ramcdona
Copy link
Contributor

@luzpaz I can't actually identify what people are doing wrong from this thread. It seems like a random group of people who are having generic trouble installing the Python package. The first person thinks they're compiling Python.

What would you fix? What would you make note of?

@luzpaz
Copy link
Contributor

luzpaz commented Oct 22, 2024

What would you fix? What would you make note of?

Well if more than 1 person was having this issue it may merit adding something to the documentation. Something like huyidao625 proposed:

The Python version must be the same as what OpenVSP was compiled with. For instance OpenVSP 3.21.2 Win64 requires Python 3.6-x64. If a different verison of Python is desired, the user must compile OpenVSP themselves. Python API Instructions

But this may be too much of an edge-case and not worth it. Perhaps then closing the issue in that case ?

@ramcdona
Copy link
Contributor

Where would you put this information? Do you think the person who needs it will find it there?

This is one of the core challenges of documenting a program like OpenVSP -- there is so much that could be done, but what is actually useful -- and how do you make it useful?

On top of all that, I'm terrible at Python. I hate the beast and I certainly don't feel qualified to tell people how to manage their environment and Python setup. I'm usually not sure what best practices for it are.

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

No branches or pull requests

6 participants