ansys / ansys/pymechanical

No interactive graphics in PyMechanical

Open
#1,701 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
83
Forks
37
Avg merge
1d 3m
Merged PRs (30d)
26

Description

### Before submitting the issue

- [x] I have verified whether the issue reproduces in Mechanical directly (paste your script into the Mechanical scripting window or run it in batch mode via `ansys-mechanical -i test.py`). If it reproduces there, the issue is likely in Mechanical rather than PyMechanical.
If it is an issue in Mechanical, please check with the Ansys support coordinator (ASC) at your company to determine who provides support for your company, or submit a request via the [Ansys Customer Support portal](https://www.ansys.com/support).
- [x] I have searched among the existing issues
- [x] I am using a Python virtual environment

### Description of the bug

No interactive graphics show up when running a PyMechanical example in Jupyter notebook and Spyder. The graphics only works if python file is run via console.

Issues configuring PyVista graphics. Installing or upgrading PyVista packages is not working.

### Steps To Reproduce

I do not see any graphics in Jupyter notebook when app.plot() is run at line 92 in the attached example.

### Which Operating System are you using?

Windows

### Which Python version are you using?

3.13

### Which Ansys Mechanical version are you using?

2026 R1 (261)

### Installed packages

aiohappyeyeballs==2.6.2
aiohttp==3.14.1
aiosignal==1.4.0
alabaster==1.0.0
annotated-doc==0.0.4
annotated-types==0.7.0
ansys-acp-core==0.3.2
ansys-additive-core==0.20.1
ansys-api-acp==0.3.1
ansys-api-additive==5.0.3
ansys-api-cfx==0.4.0
ansys-api-dbu==0.3.29
ansys-api-discovery==1.1.9
ansys-api-edb==0.3.2
ansys-api-fluent==0.3.42
ansys-api-geometry==0.4.92
ansys-api-lumerical==0.2.0
ansys-api-mapdl==0.6.0
ansys-api-mechanical==0.1.4
ansys-api-meshing-prime==0.2.0
ansys-api-modelcenter==0.3.4
ansys-api-platform-instancemanagement==1.1.3
ansys-api-pyensight==0.4.13
ansys-api-sherlock==0.1.56
ansys-api-speos==0.16.1
ansys-api-systemcoupling==0.3.1
ansys-api-tools-filetransfer==0.2.0
ansys-api-workbench==0.4.0
ansys-cfx-core==0.2.5
ansys-chemkin-core==0.2.0
ansys-conceptev-core==0.10.2
ansys-dpf-composites==0.7.0
ansys-dpf-core==0.16.1
ansys-dpf-post==0.12.0
ansys-dyna-core==0.12.1
ansys-edb-core==0.3.2
ansys-engineeringworkflow-api==0.1.2
ansys-fluent-core==0.39.0
ansys-geometry-core==0.15.5
ansys-grantami-bomanalytics==2.4.1
ansys-grantami-bomanalytics-openapi==5.0.0
ansys-grantami-dataflow-extensions==0.3.0
ansys-grantami-jobqueue==1.3.0
ansys-grantami-recordlists==2.1.1
ansys-grantami-serverapi-openapi==5.1.0
ansys-grantami-system==1.0.0
ansys-hps-client==0.12.1
ansys-hps-data-transfer-client==0.4.0
ansys-lumerical-core==0.2.0
ansys-mapdl-core==0.73.1
ansys-mapdl-reader==0.56.0
ansys-math-core==0.2.5
ansys-mechanical-core==0.12.10
ansys-mechanical-stubs==0.1.10
ansys-meshing-prime==0.10.3
ansys-modelcenter-workflow==0.1.3
ansys-motorcad-core==0.8.6
ansys-openapi-common==2.4.0
ansys-optislang-core==1.5.0
ansys-platform-instancemanagement==1.1.2
ansys-pyensight-core==0.11.12
ansys-pythonnet==3.1.0rc8
ansys-rocky-core==0.6.0
ansys-sam-sysml2==0.3.1
ansys-seascape==0.2.0
ansys-sherlock-core==1.0.2
ansys-simai-core==0.4.3
ansys-sound-core==0.3.0
ansys-speos-core==0.8.2
ansys-stk==0.3.0
ansys-systemcoupling-core==0.12.0
ansys-tools-common==0.5.0
ansys-tools-filetransfer==0.2.2
ansys-tools-visualization-interface==0.13.3
ansys-turbogrid-api==0.8.0
ansys-turbogrid-core==0.8.0
ansys-units==0.12.0
ansys-workbench-core==0.14.0
anyio==4.14.0
appdirs==1.4.4
argon2-cffi==25.1.0
argon2-cffi-bindings==25.1.0
arrow==1.4.0
astroid==4.0.4
asttokens==3.0.1
async-lru==2.3.0
asyncio-atexit==1.0.1
asyncssh==2.23.1
attrs==26.1.0
autopep8==2.0.4
babel==2.18.0
backoff==2.2.1
bcrypt==5.0.0
beartype==0.22.9
beautifulsoup4==4.15.0
binaryornot==0.6.0
black==26.5.1
bleach==6.4.0
blinker==1.9.0
cachebox==5.2.3
cattrs==26.1.0
certifi==2026.5.20
cffi==2.0.0
chardet==7.4.3
charset-normalizer==3.4.7
click==8.3.1
cloudpickle==3.1.2
clr_loader==0.3.1
cmcrameri==1.9
cmocean==4.0.3
colorama==0.4.6
colorcet==3.2.1
comm==0.2.3
comtypes==1.4.16
contourpy==1.3.3
cookiecutter==2.7.1
cryptography==49.0.0
cycler==0.12.1
cyclopts==4.18.0
dataclasses-json==0.2.5
debugpy==1.8.21
decorator==5.3.1
deepdiff==9.1.0
defusedxml==0.7.1
Deprecated==1.3.1
diff-match-patch==20241021
dill==0.4.1
dnspython==2.8.0
docker==7.1.0
docstring-to-markdown==0.17
docstring_parser==0.18.0
docutils==0.22.4
elementpath==5.1.2
email-validator==2.3.0
et_xmlfile==2.0.0
executing==2.2.1
fastjsonschema==2.21.2
filelock==3.29.4
flake8==7.1.2
Flask==3.1.3
flexcache==0.3
flexparser==0.4
fonttools==4.63.0
fqdn==1.5.1
frozenlist==1.8.0
fsspec==2026.4.0
geomdl==5.4.0
google-api-core==2.31.0
google-api-python-client==2.197.0
google-auth==2.55.0
google-auth-httplib2==0.4.0
googleapis-common-protos==1.75.0
grpcio==1.81.1
grpcio-health-checking==1.71.2
grpcio-reflection==1.71.2
grpcio-status==1.71.2
h11==0.16.0
hollerith==0.7.1
httpcore==1.0.9
httplib2==0.31.2
httpx==0.28.1
httpx-retries==0.5.0
httpx-sse==0.4.3
humanize==4.15.0
idna==3.18
ImageIO==2.37.3
imagesize==2.0.0
importlib_metadata==9.0.0
inflection==0.5.1
intervaltree==3.2.1
ipykernel==6.31.0
ipython==9.14.1
ipython_pygments_lexers==1.1.1
ipywidgets==8.1.8
isoduration==20.11.0
isort==8.0.1
itsdangerous==2.2.0
jaraco.classes==3.4.0
jaraco.collections==5.2.1
jaraco.context==6.1.2
jaraco.functools==4.5.0
jaraco.text==4.2.0
jedi==0.19.2
jellyfish==1.2.1
Jinja2==3.1.6
joblib==1.5.3
json5==0.14.0
jsonpointer==3.1.1
jsonschema==4.26.0
jsonschema-specifications==2025.9.1
jupyter==1.1.1
jupyter-console==6.6.3
jupyter-events==0.12.1
jupyter-lsp==2.3.1
jupyter_client==8.9.1
jupyter_core==5.9.1
jupyter_server==2.19.0
jupyter_server_proxy==4.5.0
jupyter_server_terminals==0.5.4
jupyterlab==4.5.8
jupyterlab_pygments==0.3.0
jupyterlab_server==2.28.0
jupyterlab_widgets==3.0.16
keyring==25.7.0
kiwisolver==1.5.0
lark==1.3.1
lsprotocol==2025.0.0
markdown-it-py==4.2.0
MarkupSafe==3.0.3
marshmallow==4.3.0
marshmallow-enum==1.5.1
marshmallow-oneofschema==3.2.0
matplotlib==3.11.0
matplotlib-inline==0.2.2
mccabe==0.7.0
mdurl==0.1.2
meshio==5.3.5
mistune==3.2.1
more-itertools==11.1.0
msal==1.37.0
msal-extensions==1.3.1
msgpack==1.2.0
multidict==6.7.1
mypy_extensions==1.1.0
narwhals==2.22.1
nbclient==0.11.0
nbconvert==7.17.1
nbformat==5.10.4
nest-asyncio==1.6.0
nest-asyncio2==1.7.2
networkx==3.6.1
nltk==3.9.4
notebook==7.5.7
notebook_shim==0.2.4
numpy==2.4.6
numpydoc==1.10.0
openpyxl==3.1.5
orderly-set==5.5.0
overrides==7.7.0
packaging==26.2
pandas==2.3.3
pandocfilters==1.5.1
parso==0.8.7
pathspec==1.1.1
pexpect==4.9.0
pickleshare==0.7.5
pillow==12.2.0
Pint==0.25.3
platformdirs==4.10.0
pluggy==1.6.0
pooch==1.9.0
portend==3.2.1
prometheus_client==0.25.0
prompt_toolkit==3.0.52
propcache==0.5.2
proto-plus==1.28.0
protobuf==5.29.6
psutil==7.2.2
ptyprocess==0.7.0
pure_eval==0.2.3
pyaedt==1.0.1
pyansys==2026.1.3
pyansys-tools-variableinterop==0.1.4
pyasn1==0.6.3
pyasn1_modules==0.4.2
pycodestyle==2.12.1
pycparser==3.0
pydantic==2.13.4
pydantic-settings==2.14.1
pydantic_core==2.46.4
pydocstyle==6.3.0
pyedb==0.77.0
pyflakes==3.2.0
PyGithub==2.9.1
pygltflib==1.16.5
Pygments==2.20.0
pygranta==2026.1.1
pyiges==0.3.4
PyJWT==2.13.0
pylint==4.0.6
pylint-venv==3.0.4
pyls-spyder==0.4.0
PyNaCl==1.6.2
pyparsing==3.3.2
pypiwin32==223
pypng==0.20220715.0
PyQt5==5.15.11
PyQt5-Qt5==5.15.2
PyQt5_sip==12.18.0
PyQtWebEngine==5.15.7
PyQtWebEngine-Qt5==5.15.2
Pyro5==5.16
pyspnego==0.12.1
python-dateutil==2.9.0.post0
python-dotenv==1.2.2
python-json-logger==4.1.0
python-lsp-black==2.0.0
python-lsp-jsonrpc==1.1.2
python-lsp-ruff==2.3.1
python-lsp-server==1.14.0
python-slugify==8.0.4
pytokens==0.4.1
pytoolconfig==1.3.1
pytwin==0.12.0
pytz==2026.2
pyuca==1.2
pyvista==0.48.4
pyvista-zstd==0.2.4
pywin32==312
pywin32-ctypes==0.2.3
pywinpty==3.0.5
PyYAML==6.0.3
pyzmq==27.1.0
QDarkStyle==3.2.3
qstylizer==0.2.4
QtAwesome==1.4.2
qtconsole==5.7.2
QtPy==2.4.3
referencing==0.37.0
regex==2026.5.9
requests==2.34.2
requests-negotiate-sspi==0.5.2
requests_ntlm==1.3.0
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
rfc3987-syntax==1.1.0
rich==15.0.0
rich-rst==2.0.1
roman-numerals==4.1.0
rope==1.14.0
rpds-py==2026.5.1
rtree==1.4.1
ruff==0.15.17
scikit-learn==1.9.0
scipy==1.17.1
scooby==0.11.2
semver==3.0.4
Send2Trash==2.1.0
serpent==1.43
setuptools==82.0.1
shellingham==1.5.4
simpervisor==1.0.0
six==1.17.0
snowballstemmer==3.1.1
sortedcontainers==2.4.0
soupsieve==2.8.4
Sphinx==9.1.0
sphinxcontrib-applehelp==2.0.0
sphinxcontrib-devhelp==2.0.0
sphinxcontrib-htmlhelp==2.1.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==2.0.0
sphinxcontrib-serializinghtml==2.0.0
spyder==6.1.4
spyder-kernels==3.1.4
sspilib==0.5.0
stack-data==0.6.3
superqt==0.8.2
tabulate==0.10.0
tempora==5.9.0
tenacity==9.1.4
terminado==0.18.1
text-unidecode==1.3
textdistance==4.6.3
threadpoolctl==3.6.0
three-merge==0.1.1
tinycss2==1.5.1
toml==0.10.2
tomli==2.4.1
tomli_w==1.2.0
tomlkit==0.15.0
tornado==6.5.7
tqdm==4.68.2
traitlets==5.15.1
trame==3.13.2
trame-client==3.13.2
trame-common==1.2.4
trame-router==2.3.0
trame-server==3.12.5
trame-vtk==2.11.7
trame-vuetify==3.2.2
transformations==2026.1.18
truststore==0.10.4
typer==0.26.7
typer-slim==0.24.0
typing-inspect==0.9.0
typing-inspection==0.4.2
typing_extensions==4.15.0
tzdata==2026.2
ujson==5.13.0
uri-template==1.3.0
uritemplate==4.2.0
urllib3==2.7.0
usd-core==25.11
uv==0.11.21
vtk==9.6.2
wakepy==1.0.0
watchdog==6.0.0
wcwidth==0.8.1
webcolors==25.10.0
webencodings==0.5.1
websocket-client==1.9.0
websockets==16.0
Werkzeug==3.1.8
whatthepatch==1.0.7
widgetsnbextension==4.0.15
WMI==1.5.1
wrapt==2.2.1
wslink==2.5.7
xmlschema==4.3.1
xmltodict==1.0.4
yapf==0.43.0
yarl==1.24.2
zipp==4.1.0
zstandard==0.25.0

[bolt_pretension.py](https://github.com/user-attachments/files/30356331/bolt_pretension.py)

Contributor guide

Open the contributing guide

Research direction

Start with the attached bolt_pretension.py example, especially the app.plot() call at line 92, and reproduce it in Jupyter and Spyder as well as the console. Compare the environments and PyVista configuration; done means the example's interactive graphics appear in both notebook and Spyder execution contexts.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter, python
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.