From 49dab9339317f2f815d148a950ccc5fcbe42ef57 Mon Sep 17 00:00:00 2001 From: Michael Boyle Date: Fri, 27 Aug 2021 16:41:17 -0400 Subject: [PATCH] Recommend force upgrading numpy [skip ci] --- README.md | 21 ++++++++++----------- setup.py | 2 +- src/quaternion/__init__.py | 2 +- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index aaed09b..b930b09 100644 --- a/README.md +++ b/README.md @@ -29,12 +29,11 @@ conda install -c conda-forge quaternion or ```sh -python -m pip install numpy -python -m pip install numpy-quaternion +python -m pip install --upgrade --force-reinstall numpy-quaternion ``` -(Optionally add `--user` after `install` in those last two if you're -not using a python environment — though you should start.) +Optionally add `--user` after `install` in the second command if +you're not using a python environment — though you should start. ## Dependencies @@ -90,21 +89,21 @@ If you prefer to use `pip` (which can be run from within a `conda` environment), you can instead do ```sh -python -m pip install numpy -python -m pip install numpy-quaternion +python -m pip install --upgrade --force-reinstall numpy-quaternion ``` (See [here](https://snarky.ca/why-you-should-use-python-m-pip/) for a -veteran python core contributor's explanation of why you should use -`python -m pip` over `pip` or `pip3`.) +veteran python core contributor's explanation of why you should always +use `python -m pip` instead of just `pip` or `pip3`.) The `--upgrade +--force-reinstall` options are not always necessary, but will ensure +that pip will update numpy if it has to. If you refuse to use `conda`, you might want to install inside your home directory without root privileges. (Conda does this by default anyway.) This is done by adding `--user` to the above command: ```sh -python -m pip install --user numpy -python -m pip install --user numpy-quaternion +python -m pip install --user --upgrade --force-reinstall numpy-quaternion ``` Note that pip will attempt to compile the code — which requires a @@ -114,7 +113,7 @@ Finally, there's also the fully manual option of just downloading the code, changing to the code directory, and running ```sh -pip install . +python -m pip install . ``` This should work regardless of the installation method, as long as you diff --git a/setup.py b/setup.py index 14e66d5..0e96e98 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ # Set this first for easier replacement -version = "2021.8.26.15.40.13" +version = "2021.8.27.16.41.17" if "win" in platform.lower() and not "darwin" in platform.lower(): extra_compile_args = ["/O2"] diff --git a/src/quaternion/__init__.py b/src/quaternion/__init__.py index b443c9f..339976a 100644 --- a/src/quaternion/__init__.py +++ b/src/quaternion/__init__.py @@ -1,7 +1,7 @@ # Copyright (c) 2020, Michael Boyle # See LICENSE file for details: -__version__ = "2021.8.26.15.40.13" +__version__ = "2021.8.27.16.41.17" __doc_title__ = "Quaternion dtype for NumPy" __doc__ = "Adds a quaternion dtype to NumPy." __all__ = ['quaternion',