DPF Install issue
I used the Ansys Python Manager to download python and relevant libraries.
When I do that and then try to run dpf in with the following command
from ansys.dpf import core as dpf
in Jupyter notebook I get the following error.
`--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[1], line 1 ----> 1 from ansys.dpf import core as dpf File ~\AppData\Local\Programs\Python\Python310\lib\site-packages\ansys\dpf\core\__init__.py:101 97 SERVER_CONFIGURATION = None 99 _server_instances = [] --> 101 settings.set_default_pyvista_config() 102 settings._forward_to_gate() File ~\AppData\Local\Programs\Python\Python310\lib\site-packages\ansys\dpf\core\settings.py:35, in set_default_pyvista_config() 32 if module_exists("pyvista"): 33 import pyvista as pv ---> 35 pv.rcParams["interactive"] = True 36 pv.rcParams["cmap"] = "jet" 37 pv.rcParams["font"]["family"] = "courier" File ~\AppData\Local\Programs\Python\Python310\lib\site-packages\pyvista\__init__.py:95, in __getattr__(name) 93 feature = inspect.getattr_static(sys.modules['pyvista.plotting'], name) 94 except AttributeError as e: ---> 95 raise AttributeError(f"module 'pyvista' has no attribute '{name}'") from None 97 return feature AttributeError: module 'pyvista' has no attribute 'rcParams'`
**Any idea what could be causing this? **
I included a text file with my installed packages for reference.
Here is a list of my installed packages.
Best Answers
-
I updated to ansys-dpf-core 0.9.0 and it worked which was surprising since I'm running ANSYS 2023 R2.
0 -
Hi @tdarling,
The installer gets you the latest version of the PyVista package, package which introduced a breaking change for ansys-dpf-core with its 0.41.0 release.
See this exact issue on GitHub https://github.com/ansys/pydpf-core/issues/1058.
This was fixed in the 0.9.0 release of ansys-dpf-core which is why it now works.The issue here is that the installer gets you the packages marked as compatible with Ansys 2023R2, along with the latest versions of our dependencies as they are not pinned.
The PyAnsys packages marked as compatible with Ansys 2023R2 are the latest ones that were released at the time as we do a snapshot of all our packages and make sure they are inter-compatible.As for you remark
@tdarling said:
I updated to ansys-dpf-core 0.9.0 and it worked which was surprising since I'm running ANSYS 2023 R2.we do test and ensure retro-compatibility between ansys-dpf-core releases and several previous releases of ANSYS, which is why ansys-dpf-core 0.9.0 is compatible with ANSYS 2023R2, 2023R1, and 2022R2.
@Sandeep Medikonda @Ramdane I will look into updating the Ansys Python Installer. Maybe we need to release a patched version of ansys-dpf-core 0.8.2 and pin this one for Ansys 2023R2.
0
Answers
-
@Ramdane for DPF and @Sandeep Medikonda for installer help - either of you have some ideas here?
0 -
0
-
@tdarling, did you install the
Ansys Metapackage 2023.2
using the installer.if that is the case then the pyansys metapackage has the dependency of
ansys-dpf-core==0.8.1
,which should be changed to
0.9.0
0