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

WISDEM pyside2 and shiboken2 error? #82

Closed
ghylander opened this issue Oct 29, 2021 · 4 comments
Closed

WISDEM pyside2 and shiboken2 error? #82

ghylander opened this issue Oct 29, 2021 · 4 comments

Comments

@ghylander
Copy link
Contributor

I'm unsure if this bug comes from ROSCO or WISDEM.

I created a new venv to isolate the issue.

If i follow all the installation steps from the docs and run certain tools from the toolbox, I get the following warning:

Using ofTools in ROSCO_toolbox...
WARNING: Be sure to pip install simpy and marmot-agents for offshore BOS runs

If I then run pip install marmot-agents and simpy, I get the following warning:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
wisdem 3.3.0 requires pyside2, which is not installed

Lastly, if I pip install pyside2 (which also installs shiboken2 as a dependency), it breaks the venv. Any time I try to run any script I get the following output:

python .\example_04.py
PySide2/__init__.py: Unable to import shiboken2 from C:\Users\gus_h\Documents\GitHub\EnerOcean\ROSCO\Examples, C:\Users\gus_h\miniconda3\envs\rosco-env3\python38.zip, C:\Users\gus_h\miniconda3\envs\rosco-env3\DLLs, C:\Users\gus_h\miniconda3\envs\rosco-env3\lib, C:\Users\gus_h\miniconda3\envs\rosco-env3, C:\Users\gus_h\miniconda3\envs\rosco-env3\lib\site-packages, C:\Users\gus_h\miniconda3\envs\rosco-env3\lib\site-packages\rosco-2.4.0-py3.8.egg, C:\Users\gus_h\miniconda3\envs\rosco-env3\lib\site-packages\future-0.18.2-py3.8.egg
Traceback (most recent call last):
  File ".\example_04.py", line 14, in <module>
    import matplotlib.pyplot as plt
  File "C:\Users\gus_h\miniconda3\envs\rosco-env3\lib\site-packages\matplotlib\pyplot.py", line 2500, in <module>
    switch_backend(rcParams["backend"])
  File "C:\Users\gus_h\miniconda3\envs\rosco-env3\lib\site-packages\matplotlib\__init__.py", line 621, in __getitem__
    plt.switch_backend(rcsetup._auto_backend_sentinel)
  File "C:\Users\gus_h\miniconda3\envs\rosco-env3\lib\site-packages\matplotlib\pyplot.py", line 257, in switch_backend
    switch_backend(candidate)
  File "C:\Users\gus_h\miniconda3\envs\rosco-env3\lib\site-packages\matplotlib\pyplot.py", line 277, in switch_backend
    class backend_mod(matplotlib.backend_bases._Backend):
  File "C:\Users\gus_h\miniconda3\envs\rosco-env3\lib\site-packages\matplotlib\pyplot.py", line 278, in backend_mod
    locals().update(vars(importlib.import_module(backend_name)))
  File "C:\Users\gus_h\miniconda3\envs\rosco-env3\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "C:\Users\gus_h\miniconda3\envs\rosco-env3\lib\site-packages\matplotlib\backends\backend_qt5agg.py", line 11, in <module>
    from .backend_qt5 import (
  File "C:\Users\gus_h\miniconda3\envs\rosco-env3\lib\site-packages\matplotlib\backends\backend_qt5.py", line 13, in <module>
    import matplotlib.backends.qt_editor.figureoptions as figureoptions
  File "C:\Users\gus_h\miniconda3\envs\rosco-env3\lib\site-packages\matplotlib\backends\qt_editor\figureoptions.py", line 11, in <module>
    from matplotlib.backends.qt_compat import QtGui
  File "C:\Users\gus_h\miniconda3\envs\rosco-env3\lib\site-packages\matplotlib\backends\qt_compat.py", line 174, in <module>
    _setup()
  File "C:\Users\gus_h\miniconda3\envs\rosco-env3\lib\site-packages\matplotlib\backends\qt_compat.py", line 87, in _setup_pyqt5
    from PySide2 import QtCore, QtGui, QtWidgets, __version__
  File "C:\Users\gus_h\miniconda3\envs\rosco-env3\lib\site-packages\PySide2\__init__.py", line 107, in <module>
    _setupQtDirectories()
  File "C:\Users\gus_h\miniconda3\envs\rosco-env3\lib\site-packages\PySide2\__init__.py", line 58, in _setupQtDirectories
    import shiboken2
  File "C:\Users\gus_h\miniconda3\envs\rosco-env3\lib\site-packages\shiboken2\__init__.py", line 30, in <module>
    _init_pyside_extension()
NameError: name '_init_pyside_extension' is not defined

As I stated at the start, I don't know if this comes from WISDEM or if it comes from ROSCO. I also don't know what "offshore BOS" means. Do i need those venv-breaking packages if I want to use FOWT platforms with ROSCO_toolbox?

@nikhar-abbas
Copy link
Collaborator

This sounds like something went wrong with your install - I'm going to close this as it should get resolved when #81 is resolved.

@ghylander
Copy link
Contributor Author

ghylander commented Nov 4, 2021

Now that the errors related to the setup.py, .yaml, etc have been addressed, can we continue this thread?
As I said I don't know if this error comes from ROSCO, WISDEM, pyside2, shiboken2, conda forge, etc

after following the setup steps I specified in #81, when I run example_04 i get the following warning (although the script executes and generates the DSICON.IN file):
image

If I install the packages specified in the warning (simpy and marmot_agents), then I get the errors I detailed above

@nikhar-abbas
Copy link
Collaborator

This is an expected warning from WISDEM when running the ROSCO tuning procedures and the additional packages should not be installed when just running ROSCO. If you intend to run WISDEM with offshore BOS (balance of station) runs, you should specifically follow the WISDEM steps. For ROSCO, we primarily do a conda install wisdem so that we can easily get ccmake and a number of other package dependancies without too much trouble.

@ghylander
Copy link
Contributor Author

perfect, thanks

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

2 participants