File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 11import os
2+ import pkg_resources
23
34from ansys .dpf .core ._version import __version__
45
2021except : # pragma: no cover
2122 pass
2223
24+ installed = [d .project_name for d in pkg_resources .working_set ]
25+ check_for = ["ansys-dpf-gatebin" , "ansys-dpf-gate" , "ansys-grpc-dpf" ]
26+ if any ([c in installed for c in check_for ]):
27+ raise ImportError (f"Error during import of ansys-dpf-core:\n "
28+ f"detected one of { check_for } installed. "
29+ f"The current version of ansys-dpf-core requires uninstalling these previous "
30+ f"dependencies to run correctly." )
31+
2332from ansys .dpf .core .dpf_operator import Operator , Config
2433from ansys .dpf .core .model import Model
2534from ansys .dpf .core .field import Field , FieldDefinition
You can’t perform that action at this time.
0 commit comments