@@ -33,40 +33,46 @@ The functions in diffpy.utils.wx module require
33
33
34
34
* ``wxPython `` - GUI toolkit for the Python language
35
35
36
- We recommend to use `Miniconda Python <https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html >`_
37
- as it allows to install the software dependencies together with
38
- diffpy.utils. For other Python distributions it is necessary to install
39
- the required software separately. As an example, on Ubuntu Linux the
40
- required software can be installed with ::
41
-
42
- sudo apt-get install python-setuptools python-numpy
43
-
44
36
45
37
INSTALLATION
46
38
------------------------------------------------------------------------
47
39
48
- The preferred method is to use Miniconda (or, less preferred, Anaconda) Python
49
- and install from the "conda-forge" channel of Conda packages ::
40
+ The preferred method is to use `Miniconda Python
41
+ <https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html> `_
42
+ and install from the "conda-forge" channel of Conda packages.
43
+
44
+ To add "conda-forge" to the conda channels, run the following in a terminal. ::
50
45
51
46
conda config --add channels conda-forge
52
- conda install diffpy.utils
53
47
54
- Another option is to use ``pip `` to download and install the
55
- latest release from `Python Package Index <https://pypi.python.org >`_ ::
48
+ We want to install our packages in a suitable conda environment.
49
+ The following creates and activates a new environment named ``utils `` ::
50
+
51
+ conda create -n utils python=3
52
+ conda activate utils
56
53
54
+ Then, to fully install ``diffpy.utils `` in our active environment, run ::
55
+
56
+ conda install diffpy.utils
57
+
58
+ Another option is to use ``pip `` to download and install the latest release from
59
+ `Python Package Index <https://pypi.python.org >`_.
60
+ To install using ``pip `` into your ``utils `` environment, we will also have to install dependencies ::
61
+
62
+ pip install numpy
57
63
pip install diffpy.utils
58
64
59
- If you prefer to install from sources, obtain the source archive and
60
- run ::
65
+ If you prefer to install from sources, obtain the source archive and run ::
61
66
62
67
python setup.py install
63
68
64
- You may need to use ``sudo `` with system Python as it attempts to
65
- install to standard system directories. If sudo is not available, check
66
- the usage info from `` python setup.py install --help `` for options to
67
- install to user-writable locations. The installation integrity can be
68
- verified by changing to the HOME directory and running ::
69
+ You may need to use ``sudo `` with system Python as it attempts to install to standard system directories.
70
+ If sudo is not available, check the usage info from `` python setup.py install --help `` for options to
71
+ install to user-writable locations.
72
+
73
+ To check the installation integrity, install pytest. If the following code passes all checks, the install worked! ::
69
74
75
+ pip install pytest
70
76
python -m diffpy.utils.tests.run
71
77
72
78
0 commit comments