Skip to content

Commit 0f9c34a

Browse files
committed
Improved installation instructions.
1 parent 5be7964 commit 0f9c34a

File tree

1 file changed

+44
-25
lines changed

1 file changed

+44
-25
lines changed

docs/install.md

Lines changed: 44 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,94 @@
11
# Installation
2-
Although you can run *Structure_threader* by simply cloning the repository (or
2+
3+
## Preferred method
4+
5+
Since v0.1.8 *Structure_threader* is available in
6+
[Pypi](https://pypi.python.org/pypi/structure_threader/0.1.8), which means that
7+
currently, installing *Structure_threader* is as simple as running
8+
`pip3 install structure_threader`. Don't forget the `--user` option if you can't
9+
or don't want to install the program as `root` user.
10+
11+
## Alternative methods
12+
13+
You can also run *Structure_threader* by simply cloning the repository (or
314
downloading one of the releases), and placing the contents of the directory
4-
"structure_threader", $PATH, there is now a better, simpler way.
5-
Since version 0.1.6 `setup.py` is implemented, and therefore all that is
6-
required is running `python3 setup.py install` (or even better,
7-
`pip install .`) from the distribution's root directory (where `setup.py` is
8-
located).
15+
"structure_threader", on any location on your `$PATH` env var.
16+
17+
Another alternative, that can be used since version 0.1.6 is the `setup.py`
18+
method. This can be used either by running `python3 setup.py install` (or even
19+
better, `pip3 install .`) from the distribution's root directory (where
20+
`setup.py` is located).
21+
922
Please note that while dependencies like numpy and matplotlib are handled by
10-
this method, and if using the `pip` method for installing, binary distributions
11-
of STRUCTURE and fastStructure are also installed.
23+
this method, the preferred method for installing via Pypi will also install
24+
binary versions of both STRUCTURE and fastStructure for your platform.
1225
These binaries are installed in the "standard" `setup.py`
13-
[locations](https://docs.python.org/2/install/), eg. `/usr/bin` is installed
14-
with `sudo` or `~/.local/bin` if installed with the option `--user`, etc...
15-
Regardless, if you wish to compile your own binaries, you may wish to rely on
16-
our
26+
[locations](https://docs.python.org/2/install/), eg. `/usr/bin/` if installed
27+
with `sudo` or `~/.local/bin/` if installed with the option `--user`, etc...
28+
29+
If you wish to compile your own binaries for these programs, you may wish to
30+
rely on our
1731
["helper_scripts"](https://github.com/StuntsPT/Structure_threader/tree/master/helper_scripts)
1832
which contain commands to compile and install *Structure* **and**
19-
*fastStructure* (along with any required dependencies).
20-
Since v0.1.8 *Structure_threader* is available in
21-
[Pypi](https://pypi.python.org/pypi/structure_threader/0.1.8), which means that
22-
currently, installing *Structure_threader* is as simple as running
23-
`pip install structure_threader`. Don't forget the `--user` option if you can't
24-
or don't want to install the program as `root` user.
33+
*fastStructure* (along with any required dependencies). For more details check
34+
the next few sections.
2535

2636

2737
## Structure_threader helper scripts
38+
2839
The directory "helper_scripts" contains two scripts that will install STRUCTURE and fastStructre, respectively in a *semi* automatic way.
2940

3041
Both scripts default the programs' install locations to ~/Software/<program_name>. You can change this in the scripts themselves should you wish to change this location.
3142

3243

3344
### install_structure.sh
45+
3446
This script will download and install STRUCTURE.
3547

3648

3749
#### Requirements:
3850
* a C compiler, such as GCC, with fortran support.
3951
* Cmake is required to build LAPACK
4052

41-
In every HPC this should be available.
53+
This should be available in every HPC environment.
4254

43-
In Ubuntu, all you should need is the package "build-essential" (if it is not already installed for some reason). In other distros, the package name should be similar. It can be installed like this:
55+
In Ubuntu, all you should need is the package "build-essential" (if it is not
56+
already installed for some reason). It can be installed like this:
4457

4558
```
4659
sudo apt-get install build-essential
4760
```
4861

62+
In other distros, the package name should be similar.
4963

5064
### install_faststructure.sh
51-
This script will download and install faststructure and its dependencies.
65+
This script will download and install fastStructure and its dependencies.
5266

53-
Faststructure depends on quite a few software packages:
67+
fastStructure depends on quite a few software packages:
5468
* cython
5569
* numpy
5670
* scipy
5771
* GNU scientific library
5872

59-
If these are already installed in your system, feel free to comment the script section that will install them. Otherwise it will install a new local copy of these programs. Otherwise, you can install them in Ubuntu with the following command:
73+
If these are already installed in your system, feel free to comment the script
74+
section that will install them. Otherwise it will install a new local copy of
75+
these programs. You can install these packages in Ubuntu with the following
76+
command:
6077

6178
```
6279
sudo apt-get install cython python-numpy python-scipy gsl-bin
6380
```
6481

6582
###Important note:
6683

67-
If you are relying on the GNU Scientific Library that was installed using the `install_faststructure` script, you will need to make your system aware of where these libraries are.
84+
If you are relying on the GNU Scientific Library that was installed using the
85+
`install_faststructure` script, you will need to make your system aware of
86+
where these libraries are.
6887
for that, add the following to your `~/.bashrc`:
6988

7089
```bash
7190
LD_LIBRARY_PATH=$install_dir/lib
7291
export LD_LIBRARY_PATH
7392
```
7493

75-
Where `$install_dir` is the directory defined in `install_faststructure`.
94+
Where `$install_dir` is the directory defined in `install_faststructure.sh`.

0 commit comments

Comments
 (0)