Skip to content
This repository was archived by the owner on Sep 4, 2021. It is now read-only.

Commit 7a616a6

Browse files
committed
pip requirements, unix setup script, updated docs
1 parent 3dd32d6 commit 7a616a6

File tree

3 files changed

+57
-5
lines changed

3 files changed

+57
-5
lines changed

docs/4.0/circuitscape_4_0.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -312,10 +312,10 @@ the Python packages repository. You will also need to install several packages
312312
upon which Circuitscape depends.
313313

314314
Python can be installed from http://www.python.org/ and the `pip` installer
315-
can be installed from http://www.pip-installer.org/en/latest/installing.html.
315+
can be installed from http://www.pip-installer.org/.
316316

317317
Before running Circuitscape, you will also need to install the Numpy, Scipy,
318-
PyAMG, wxPython 2.8, and PythonCard Python packages.
318+
PyAMG, wxPython and PythonCard Python packages.
319319

320320
Once these are installed, run the following command to get Circuitscape:
321321

@@ -331,10 +331,16 @@ Circuitscape:
331331

332332
## Linux
333333

334-
?Replace below? Would pip work for this?
334+
Circuitscape can be installed as a Python package on Linux, following the instructions above.
335+
336+
Optionally, you may download the following two files from the Circuitscape source repository:
337+
338+
- `setup-unix.sh`
339+
- `pip_requirements.txt`
340+
341+
And run the command `sh setup-unix.sh` to guide you through the installation process.
342+
335343

336-
Instructions to install and run Circuitscape on Linux can be found on the
337-
Circuitscape website.
338344

339345
#4. Using Circuitscape with the graphical user interface
340346

pip_requirements.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
scipy>=0.11.0
2+
numpy>=1.6.2
3+
pyamg>=2.1.0
4+
psutil>=1.1.3
5+
6+
# manual install required for:
7+
# PythonCard>=0.8.2
8+
# wxPython>=2.8

setup-unix.sh

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# check if python is installed
2+
echo "Looking for python..."
3+
which python
4+
if [ $? -ne 0 ]; then
5+
echo "Can't find python command"
6+
echo "Install python from http://www.python.org/"
7+
exit 1
8+
fi
9+
10+
# check if pip is installed
11+
echo "Looking for pip..."
12+
which pip
13+
if [ $? -ne 0 ]; then
14+
echo "Can't find python package installer pip"
15+
echo "Install pip from http://www.pip-installer.org/"
16+
exit 1
17+
fi
18+
19+
20+
echo "Installing packages required by circuitscape..."
21+
pip install -r pip_requirements.txt
22+
if [ $? -ne 0 ]; then
23+
echo "Failed to install required packages for circuitscape"
24+
exit 1
25+
fi
26+
27+
echo "Installing circuitscape..."
28+
pip install circuitscape
29+
if [ $? -ne 0 ]; then
30+
echo "Failed to install circuitscape"
31+
exit 1
32+
fi
33+
34+
echo "Circuitscape command line mode is now installed."
35+
echo "For a graphical user interface the following packages need to be installed manually:"
36+
echo "1. wxPython. Refer: http://wiki.wxpython.org/How%20to%20install%20wxPython"
37+
echo "2. PythonCard. Refer: http://pythoncard.sourceforge.net/installation.html"
38+

0 commit comments

Comments
 (0)