Skip to content

Commit 786872b

Browse files
committed
Edited installation instructions from easy_install branch with some modifications.
1 parent 5619a07 commit 786872b

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ If you run into issues using either option above, it's likely due to compiler is
5555
export CC= pathYouCopiedInQuotes
5656
export CFLAGS="-W"
5757
```
58-
9. Finally install `rpy2` using the new compiler you just installed: `pip install rpy2`
58+
9. Finally install `rpy2` using the new compiler you just installed: `conda install -c conda-forge rpy2` if you followed Option 1 above or `pip install rpy2` if you followed Option 2
5959
10. Now you should be able to `pip install pymer4` :)
6060
6161
#### Change-log

docs/index.rst

+15-12
Original file line numberDiff line numberDiff line change
@@ -51,21 +51,22 @@ Installation
5151
:code:`pymer4` since version 0.6.0 is only compatible with Python 3. Versions 0.5.0 and lower will work with Python 2, but will not contain any new features. :code:`pymer4` also requires a working R installation with specific packages installed and it will *not* install R or these packages for you. However, you can follow either option below to easily handle these dependencies.
5252

5353
Option 1 (simpler but slower model fitting)
54-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
54+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5555
If you don't have R installed and you use the Anaconda Python distribution simply run the following commands to have Anaconda install R and the required packages for you. This is fairly painless installation, but model fitting will be slower than if you install R and ``pymer4`` separately and configure them (option 2).
5656

57-
1. ``conda install -c conda-forge rpy2 r-lmertest r-lsmeans``
57+
1. ``conda install -c conda-forge r r-base r-lmertest r-lsmeans rpy2``
5858
2. ``pip install pymer4``
59+
3. Test the installation to see if it's working by running ``python -c "from pymer4.test_install import test_install; test_install()"``
60+
4. If there are errors follow the guide below
5961

6062
Option 2 (potentially trickier, but faster model fitting)
61-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
62-
This method assumes you already have R installed. If not install first install it from the `R Project website <https://www.r-project.org/>`_. Then complete the following steps:
63+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
64+
This method assumes you already have R installed. If not install first install it from the `R Project website <https://www.r-project.org/>`_. Then complete the following steps:
6365

6466
1. Install the required R packages by running the following command from within R: ``install.packages(c('lme4','lmerTest','lsmeans'))``
6567
2. Install pymer4 by running the following command in a terminal: ``pip install pymer4``
66-
3. Test the installation to see if it's working by running the following command in a terminal: ``python -c "from pymer4.test_install import test_install; test_install()"``
67-
68-
If this produces any errors they are likely related to ``rpy2``. See the section below for a fix.
68+
3. Test the installation to see if it's working by running the following command in a terminal: ``python -c "from pymer4.test_install import test_install; test_install()"``
69+
4. If there are errors follow the guide below
6970

7071
Install issues
7172
^^^^^^^^^^^^^^
@@ -74,23 +75,25 @@ Some users have issues installing ``pymer4`` on recent versions of macOS. This i
7475
1. Install `homebrew <https://brew.sh/>`_ if you don't have it already by running the command at the link (it's a great pacakage manager for macOS). To check if you already have it, do ``which brew`` in your Terminal. If nothing pops up you don't have it.
7576
2. Fix brew permissions: ``sudo chown -R $(whoami) $(brew --prefix)/*`` (this is **necessary** on macOS Sierra or higher (>= macOS 10.12))
7677
3. Update homebrew ``brew update``
77-
4. Install an updated compiler: ``brew install gcc``, or if you have homebrew already, ``brew upgrade gcc``
78-
5. Enable the new compiler for use:
78+
4. Install the xz uitility ``brew install xz``
79+
5. At this point you can try to re-install ``pymer4`` and re-test the installation. If it still doesn't work follow the next few steps below
80+
6. Install an updated compiler: ``brew install gcc``, or if you have homebrew already, ``brew upgrade gcc``
81+
7. Enable the new compiler for use:
7982

8083
.. code-block:: bash
8184
8285
export CC="$(find `brew info gcc | grep usr | sed 's/(.*//' | awk '{printf $1"/bin"}'` -name 'x86*gcc-?')"
8386
export CFLAGS="-W"
8487
85-
6. If the above results in any error output (it should return nothing) you might need to manually find out where the new compiler is installed. To do so use ``brew info gcc`` and ``cd`` into the directory that begins with ``/usr`` in the output of that command. From there ``cd`` into ``bin`` and look for a file that begins with ``x86`` and ends with ``gcc-7``. It's possible that the directory ends with ``gcc-8`` or a higher number based on how recently you installed from homebrew. In that case, just use the latest version. Copy the *full path* to that file and run the following:
88+
8. If the above results in any error output (it should return nothing) you might need to manually find out where the new compiler is installed. To do so use ``brew info gcc`` and ``cd`` into the directory that begins with ``/usr`` in the output of that command. From there ``cd`` into ``bin`` and look for a file that begins with ``x86`` and ends with ``gcc-7``. It's possible that the directory ends with ``gcc-8`` or a higher number based on how recently you installed from homebrew. In that case, just use the latest version. Copy the *full path* to that file and run the following:
8689

8790
.. code-block:: bash
8891
8992
export CC= pathYouCopiedInQuotes
9093
export CFLAGS="-W"
9194
92-
7. Finally install ``rpy2`` using the new compiler you just installed: ``pip install rpy2``
93-
8. Now you should be able to ``pip install pymer4`` :)
95+
9. Finally install ``rpy2`` using the new compiler you just installed: ``conda install -c conda-forge rpy2`` if you followed Option 1 above or ``pip install rpy2`` if you followed Option 2
96+
10. Now you should be able to ``pip install pymer4`` :)
9497

9598
Basic Usage Guide
9699
-----------------

0 commit comments

Comments
 (0)