forked from pylayers/pylayers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL.txt
190 lines (122 loc) · 6.24 KB
/
INSTALL.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
TOC :
- Linux/OSX Install
- Windows Install
- Source and project directories
- Usual Install issues
################################
# LINUX/OSX Install #
################################
The prefer way to install PyLayers is to first install the free python distribution Anaconda on your
platform. ( https://store.continuum.io/cshop/anaconda/ )
By doing so, you're installing most of the required dependencies.
1 - Download Anaconda from https://store.continuum.io/cshop/anaconda/
2 - Install Anaconda with the given command ( $bash Anaconda-<version>-<plateform>.sh ) .
Important : Say yes to add Anaconda to your path
3 - Run "./installer_unix" file from the PyLayers directory (YOUR FIRST NEED to add exe rights using the command: chmod +x ./installer_unix )
5- Done
############################
# Windows Install #
############################
1 - Download and Install Anaconda from www.anaconda/download
2 - Download the Shapely package corresponding to your platform from http://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely *
3 - Download the Basemap package corresponding to your platform fromhttp://www.lfd.uci.edu/~gohlke/pythonlibs/#basemap
4 - Install Shapely and Basemap using the downloaded file
5 - Run installer.bat
6 - Set environement Variables :
Procedure for WinXP : http://support.microsoft.com/kb/310519/fr-fr
Procedure for Vista/windows 7: Start -> Right click on computer -> Properties -> Advanced system parameters -> Environement variables
PYLAYERS=<path to the directory where pylayers is located>
BASENAME=<path to a directory where you want to host your projects>
* Despite shapely is part of the Anaconda distribution, the Windows distribution doesn't contains the libgeos dependencies.
#######################################
# Source/project Directories #
#######################################
The source and Project directory path are automatically filled into a ".pylayers" file during the install. The .pylayers file is stored at the root of user's home (~/).
- The source directory, gathers all the source files.
- The project directory , gathers configuration files.
The default ".pylayers" contains :
source
/the/path/where/installer/has/been/run/pylayers
project
~/pylayers_project
The source path indicates where the PyLayers' source files are located. You generally don't have to modify this path
The project path indicates where the configurations files are located.
If you decide to move your project directory elsewhere, you must change the project path in consequence.
Notes for previous users of PyLayers:
------------------------------------
The environment variables $PYLAYERS and $BASENAME are no longer required.
If you try to re-install PyLayers on an existing version:
-the source path of the .pylayers file will be set at the value contained into the $PYLAYERS environment variable
-the project path of the .pylayers file will be set at the value contained into the $BASENAME environment variable
#################################
# Usual install issues #
#################################
Most of the issue encountered during the install is due to
1- Multiple python installations
and/or 2- Multiple installation of some packages ( especially shapely/basemap under windows)
1- Often, multiple python installation co-exists on a same computer, and this can cause complex PyLayers installation issues. To avoid that kind of issue, please,, make sure that you're using the python installation provided by Anaconda ,and not another one.
To this end, you can check this on unix platform with :
$ which python
and under windows by opening 'cmd' and using :
c:\ for %i in (python.exe) do @echo. %~$PATH:i
If the answer doesn't point to the Anaconda installation directory, you're using the wrong python version.
You have to update the default python installation. I cannot describe here the detail procedure because it
is really depend to your configuration.
2- Another source of issues comes from some package conflicts.
This is especially the case by using a WINDOWS OS, when the shapely installation has to be perfomed by using an external installer and not the one provided by Anaconda (because it does not contains required dependencies).
If after the installation, the import of a PyLayers module cause an Error involving shapely and/or basemap, you're probably facing the package conflict issue.
The easiest way to solve it is to remove the '.egg' of the incriminated package in :
$ <Path to Anaconda>/lib/python2.7/site-packages/ (UNIX)
or
c:\<Path to Anaconda>\Lib\site-packages (Windows)
Dependencies
------------
The following modules are required to use pylayers
numpy>=1.6.1
scipy>=0.10.1
networkx>=1.7
matplotlib>=1.1.0
shapely>=1.2.14
descartes>=1.0
SimPy>=2.2
PIL>=1.1.5
bitstring>=3.0.2
pyintervall>=1.0
osmapi>=0.3
imposm
basemap>=1.0
pandas >=0.12.0
mayavi >=4.3.1
Example of installation procedure for ubuntu 12.04 (DEPRECATED)
---------------------------------------------------------------
The installation of matplotlib basemap requires installation of libraries GEOS
and PROJ4. The installation procedure is well described in
http://matplotlib.org/basemap/users/installing.html
For supporting the osm format PyLayers is relying on imposm. The installation
of imposm is not straighforward it requires to install first Tokyo-Cabinet
and Google-Protobuf library. PyLayers can work without imposm you need to
comment the only import to the module in pylayers/gis/osmparser.py.
http://imposm.org/docs/imposm/latest/install.html#id1
This sequence of command works on a ubuntu 12.04
> sudo apt-get install build-essential
> sudo apt-get install libgeos-c1
> sudo apt-get install protobuf-compiler
> sudo apt-get install libprotobuf-dev
> sudo apt-get install libtokyocabinet-dev
> sudo apt-get install libpq-dev
> sudo apt-get install python-dev
> pip install simpy
> pip install shapely
> pip install imposm
> conda install gdal
Most of this dependencies are handled in the setup.py script.
python setup.py install
Installing PyInterval
sudo easy_install pyinterval
get crlibm library first
http://lipforge.ens-lyon.fr/frs/?group_id=8&release_id=123
if problem for compilation add
CPPFLAGS= -fPIC in scs_lib/Makefile
Testing
-------
make test-code