Skip to content

Commit fcb0ab3

Browse files
committed
Update information on installing and getting started
1 parent f33d2e2 commit fcb0ab3

File tree

3 files changed

+62
-16
lines changed

3 files changed

+62
-16
lines changed

doc/install.rst

Lines changed: 59 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,33 @@
11
.. _install:
22

3-
Installation and Dependencies
4-
=============================
3+
Installing and Getting Started
4+
==============================
55

6-
Installing PySurfer is quite simple with easy_install_::
6+
Installing PySurfer is quite simple with pip_::
77

8-
easy_install -U pysurfer
8+
pip install pysurfer
99

10-
or pip_::
10+
If you already have PySurfer installed, you can also use pip to update it::
1111

12-
pip install pysurfer
12+
pip install -U pysurfer
13+
14+
If you'd like to install the development version, you have two options. You can
15+
use pip::
16+
17+
pip install git+git://github.com/nipy/pysurfer.git#egg=pysurfer
18+
19+
Or you can clone the `git repository <https://github.com/nipy/PySurfer>`_ and
20+
install from the source directory::
21+
22+
python setup.py install
23+
24+
If you don't have pip, you can also install PySurfer with easy_install_, or use
25+
easy_install to get pip.
26+
27+
Dependencies
28+
~~~~~~~~~~~~
29+
30+
PySurfer requires Python 2.7, and it does not work on Python 3.
1331

1432
To use PySurfer, you will need to have the following Python packages:
1533

@@ -19,17 +37,42 @@ To use PySurfer, you will need to have the following Python packages:
1937
* nibabel_
2038
* mayavi_
2139
* matplotlib_
22-
* PIL_
2340

24-
An easy option to get all of these packages is to use the Enthought
25-
Python Distribution (EPD_) which is free for academic use.
41+
Some functions also make use of the Python Imaging Library (PIL_), although
42+
it's not mandatory.
2643

27-
.. include:: links_names.txt
44+
An easy option to set up this environment is the Anaconda_ distribution, which
45+
is free and ships with many of the required packages. If you use Anaconda,
46+
you'll need to install Mayavi separately. This can be done using the ``conda``
47+
command::
48+
49+
conda install mayavi
2850

29-
.. note::
51+
You'll also need to install nibabel, which can be done using ``pip`` as above.
52+
53+
Another option for getting set up is the Enthough Canopy_ environment, which is
54+
similar to Anaconda and free for academic use.
55+
56+
Getting started
57+
~~~~~~~~~~~~~~~
58+
59+
PySurfer generally works out of the box on Linux systems. Getting started on
60+
OSX can be a bit more difficult. We have had success using the Anaconda
61+
distribution with the additional step of setting the environment variable
62+
``QT_API`` to ``pyqt``::
63+
64+
export QT_API=pyqt
65+
66+
If you want to use PySurfer interactively, you should do so in ipython_. After
67+
starting ipython (either in the terminal, qtconsole, or notebook), you have to
68+
activate the correct GUI backend, which is probably qt::
69+
70+
%gui qt
71+
72+
This will allow you to have an open PySurfer window while still being able to
73+
execute code in the console/notebook.
74+
75+
If you are having trouble getting started using PySurfer, please describe the problem on the `nipy mailing list`_.
76+
77+
.. include:: links_names.txt
3078

31-
For optimal results and performance make sure IPython is invoked using the
32-
best GUI back end. In an EPD environment on Mac OS X this would be WX,
33-
so `ipython --pylab wx`. On Linux Debian / Ubuntu (Neurodebian) QT seems
34-
to be more appropriate, so `ipython --pylab qt`. Reports for other platforms
35-
and distributions are appreciated.

doc/links_names.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@
7575
.. _EPD: http://www.enthought.com/products/epd.php
7676
.. _Traits: http://code.enthought.com/projects/traits/
7777
.. _PIL: http://www.pythonware.com/products/pil/
78+
.. _Anaconda: https://store.continuum.io/cshop/anaconda/
79+
.. _Canopy: https://www.enthought.com/products/canopy/
7880

7981
.. Python imaging projects
8082
.. _PyMVPA: http://www.pymvpa.org

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ def check_dependencies():
7777
zip_safe=False, # the package can run out of an .egg file
7878
classifiers=['Intended Audience :: Science/Research',
7979
'Intended Audience :: Developers',
80+
'Programming Language :: Python :: 2.7',
8081
'License :: OSI Approved',
8182
'Programming Language :: Python',
8283
'Topic :: Software Development',

0 commit comments

Comments
 (0)