@@ -19,54 +19,49 @@ function over a new grid.
19
19
For more information about the diffpy.utils library, see the users manual at
20
20
http://diffpy.github.io/diffpy.utils.
21
21
22
-
23
- REQUIREMENTS
22
+ INSTALLATION
24
23
------------------------------------------------------------------------
25
24
26
- The diffpy.utils package requires Python 3.7 or later or 2.7 and
27
- the following software:
28
-
29
- * ``setuptools `` - tools for installing Python packages
30
- * ``NumPy `` - library for scientific computing with Python
25
+ The preferred method is to use `Miniconda Python
26
+ <https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html> `_
27
+ and install from the "conda-forge" channel of Conda packages.
31
28
32
- The functions in diffpy.utils.wx module require
29
+ To add "conda-forge" to the conda channels, run the following in a terminal. ::
33
30
34
- * `` wxPython `` - GUI toolkit for the Python language
31
+ conda config --add channels conda-forge
35
32
36
- We recommend to use `Anaconda Python <https://www.anaconda.com/download >`_
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 ::
33
+ We want to install our packages in a suitable conda environment.
34
+ The following creates and activates a new environment named ``diffpy-utils `` ::
41
35
42
- sudo apt-get install python-setuptools python-numpy
36
+ conda create -n diffpy-utils python=3
37
+ conda activate diffpy-utils
43
38
39
+ Then, to fully install ``diffpy.utils `` in our active environment, run ::
44
40
45
- INSTALLATION
46
- ------------------------------------------------------------------------
41
+ conda install diffpy.utils
47
42
48
- The preferred method is to use Anaconda Python and install from the
49
- "diffpy" channel of Anaconda packages ::
43
+ Another option is to use ``pip `` to download and install the latest release from
44
+ `Python Package Index <https://pypi.python.org >`_.
45
+ To install using ``pip `` into your ``diffpy-utils `` environment, we will also have to install dependencies ::
50
46
51
- conda config --add channels diffpy
52
- conda install diffpy.utils
47
+ pip install numpy
48
+ pip install diffpy.utils
53
49
54
- Another option is to use `` easy_install `` to download and install the
55
- latest release from ` Python Package Index < https://pypi.python.org >`_ ::
50
+ For those planning to use functions in the `` diffpy.utils.wx `` module, you will also need to install `` wxPython''.
51
+ Both of the following lines will install this package. ::
56
52
57
- easy_install diffpy.utils
53
+ conda install wxPython
54
+ pip install wxPython
58
55
59
- If you prefer to install from sources, obtain the source archive and
60
- run ::
56
+ If you prefer to install from sources, after installing the dependencies, obtain the source archive from
57
+ `GitHub<https://github.com/diffpy/diffpy.utils/>`_. Once installed, ``cd `` into your ``diffpy.utils `` directory
58
+ and run the following ::
61
59
62
- python setup.py install
60
+ pip install -e .
63
61
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 ::
62
+ To check the installation integrity, if the following passes all checks, you are good! ::
69
63
64
+ pip install pytest
70
65
python -m diffpy.utils.tests.run
71
66
72
67
0 commit comments