Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated installation instructions (for Windows) #310

Merged
merged 5 commits into from
Oct 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ jobs:
strategy:
matrix:
host-os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.8", "3.9", "3.10"]
numpy-version: ["1.21"]
pyqt-version: ["5.12"]
python-version: ["3.9", "3.10", "3.11"]
numpy-version: ["1.24"]
pyqt-version: ["5.15"]
include:
- host-os: "ubuntu-latest"
conda-mamba: "mamba"
- host-os: "macos-latest"
conda-mamba: "mamba"
- host-os: "windows-latest"
conda-mamba: "conda"
conda-mamba: "mamba"
fail-fast: false

runs-on: ${{ matrix.host-os }}
Expand Down Expand Up @@ -52,6 +52,8 @@ jobs:

- uses: conda-incubator/setup-miniconda@v2
with:
# miniforge-variant: Mambaforge
miniforge-version: latest
channels: conda-forge
channel-priority: flexible
auto-update-conda: true
Expand Down Expand Up @@ -83,7 +85,7 @@ jobs:
run: |
set -vxeo pipefail

conda install mamba -n base -c conda-forge
# conda install -y -n base --override-channels -c conda-forge mamba 'python_abi=*=*cp*'

${{ matrix.conda-mamba }} install -y \
python=${{ matrix.python-version }} \
Expand Down
39 changes: 21 additions & 18 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,49 @@
Installation
============

PyXRF is supported for Python 3.7-3.10 in Linux/Mac/Windows systems.
PyXRF is supported for Python 3.9-3.11 in Linux/Mac/Windows systems.
The easiest way to install PyXRF is to load it into a Conda environment from
``conda-forge`` Anaconda channel. Installation instructions are
identical for all supported OS.

.. note::

**Installation on Windows**: PyXRF can be installed from *conda-forge* only in the environments
with Python 3.9 and older. Python 3.10 and 3.11 (latest and default) are currently
not supported. If there is no existing Conda installation, download and
install *Miniconda3*, choose the option to add *Miniconda3* to system PATH when asked,
then run the following commands (replace the environment name `pyxrf-env` with
any convenient name if necessary):
**Installation on Windows**: Since *Conda* does not behave very well recently,
use *Mamba* to install PyXRF from *conda-forge* channel (see the *Mamba* installation
notes below). For example, the following sequence of commands creates
a new environment named ``pyxrf-env`` with Python 3.10 and installs PyXRF into
the environment. Skip the ``mamba create`` command to install PyXRF into
an existing environment.

.. code:: bash

$ conda create -n pyxrf-env python=3.9 pip -c conda-forge
$ conda activate pyxrf-env
$ conda install pyxrf -c conda-forge

$ mamba create -n pyxrf-env python=3.10 pip -c conda-forge
$ mamba activate pyxrf-env
$ mamba install pyxrf -c conda-forge

.. note::

If you experience problems using `conda`, in particular if `conda` gets stuck trying to resolve
the environment, you may try using `mamba`, which is designed as a drop-in replacement for
`conda`. Once you install *Miniconda* or *Anaconda*, install `mamba` in the base environment:
If you experience problems using *Conda*, in particular if *Conda* gets stuck trying to resolve
the environment, use *Mamba*, which is designed as a drop-in replacement for *Conda*.
*Mamba* is included in the `Miniforge distribution <https://github.com/conda-forge/miniforge>`_.
It can also be installed in the base environment of an existing installation of *Miniconda*
or *Anaconda*:

.. code:: bash

$ conda install mamba -n base -c conda-forge
$ conda install -n base --override-channels -c conda-forge mamba 'python_abi=*=*cp*'

See `Mamba installation instructions <https://mamba.readthedocs.io/en/latest/mamba-installation.html#mamba-install>`_
for more details.

Then use `mamba` instead of `conda` in all the following commands, for example
**How to use `mamba`:** Simply replace ``conda`` with ``mamba`` when you create an environment,
install or remove packages, etc. For example

.. code:: bash

$ mamba create -n pyxrf-env python=3.9 pip -c conda-forge
$ mamba activate pyxrf-env
$ mamba install pyxrf -c conda-forge

You may still use `conda` where it works well, e.g. to activate an existing environment.

1. Install `Miniconda3 <http://conda.pydata.org/miniconda.html>`_ or
`Anaconda <https://www.anaconda.com/distribution>`_. Select the latest version.
Expand Down
Loading