Skip to content

Commit cad623f

Browse files
authored
Fix and improve install section (#794)
* Fix and improve install section * Apply suggestions from code review * Update docs/source/getting_started/install.rst * Rework the test insatllation section and the plotting section * Fix ref to user_guide_plotting section * Fix code section appearance
1 parent 4500bd7 commit cad623f

File tree

1 file changed

+30
-21
lines changed

1 file changed

+30
-21
lines changed

docs/source/getting_started/install.rst

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ with this command:
1616
1717
pip install ansys-dpf-core
1818
19+
PyDPF-Core plotting capabilities require to have `PyVista <https://pyvista.org/>`_ installed.
20+
To install PyDPF-Core with its optional plotting functionalities, use:
21+
22+
.. code::
23+
24+
pip install ansys-dpf-core[plotting]
25+
26+
For more information about PyDPF-Core plotting capabilities, see :ref:`user_guide_plotting`.
1927

2028
To use PyDPF-Core with Ansys 2021 R1, install the latest version
2129
with this command:
@@ -25,25 +33,25 @@ with this command:
2533
pip install ansys-dpf-core<0.3.0
2634
2735
28-
Install using a wheel file
29-
--------------------------
30-
31-
If you are unable to install PyDPF-Core on the host machine due to
32-
network isolation, download the latest wheel file from `PyDPF-Core
33-
GitHub <https://github.com/pyansys/pydpf-core>`_ or
34-
`PyDPF-Core PyPI <https://pypi.org/project/ansys-dpf-core/>`_.
36+
Install without internet
37+
------------------------
3538

36-
Install for a quick tryout
37-
--------------------------
39+
If you are unable to install PyDPF-Core on the host machine using ``pip`` due to
40+
network isolation, download the wheelhouse corresponding to your platform and Python interpreter version
41+
for the latest release of PyDPF-Core from the assets section of the `latest PyDPF-Core release on GitHub <https://github.com/pyansys/pydpf-core/releases/latest>`_.
3842

39-
For a quick tryout, install PyDPF-Core with this code:
43+
The wheelhouse is a ZIP file containing Python wheels for all the packages PyDPF-Core requires to run.
44+
To install PyDPF-Core using the downloaded wheelhouse, unzip the wheelhouse to a local directory,
45+
then use the following command from within this local directory:
4046

4147
.. code::
4248
43-
from ansys.dpf.core import Model
44-
from ansys.dpf.core import examples
45-
model = Model(examples.find_simple_bar())
46-
print(model)
49+
pip install --no-index --find-links=. ansys-dpf-core
50+
51+
Beware that PyDPF-Core wheelhouses do not include the optional plotting dependencies.
52+
To allow for plotting capabilities, also download the wheels corresponding to your platform and Python interpreter version
53+
for `PyVista <https://pypi.org/project/pyvista/#files>`_ and
54+
`matplotlib <https://pypi.org/project/matplotlib/#files>`_, then place them in the same previous local directory and run the command above.
4755

4856

4957
Install in development mode
@@ -58,14 +66,15 @@ development flag:
5866

5967
.. _target_to_install_with_plotting_capabilities:
6068

61-
Install with plotting capabilities
62-
----------------------------------
6369

64-
PyDPF-Core plotting capabilities are based on `PyVista <https://pyvista.org/>`_.
65-
This means that PyVista must be installed with PyDPF-Core. To proceed, use this command:
70+
Check the installation
71+
----------------------
6672

67-
.. code::
73+
Run the following Python code to verify your PyDPF-Core installation:
6874

69-
pip install ansys-dpf-core[plotting]
75+
.. code::
7076
71-
For more information about PyDPF-Core plotting capabilities, see :ref:`_user_guide_plotting`.
77+
from ansys.dpf.core import Model
78+
from ansys.dpf.core import examples
79+
model = Model(examples.find_simple_bar())
80+
print(model)

0 commit comments

Comments
 (0)