source: INSTALL @ 2528:6ddb3bd098db

Revision 2528:6ddb3bd098db, 5.3 KB checked in by Samuel Kim <ubuntor2000@…>, 3 years ago (diff)

add LD_LIBRARY_PATH commands to ubuntu quickstart

Line 
1PySoy Installation Guide
2========================
3While many PySoy users will grab the latest pre-packaged release with
4everything taken care of for them, users and developers compiling from
5Mercurial or building a package for distribution may need this guide.
6(See the windows_building.txt for instructions to compile/build/install
7on Windows)
8
9
10Dependencies
11------------
12You'll want to make sure these are installed before proceeding:
13    Python  >= 3.1
14    libsoy  == 1.0_beta3
15
16If you're using a binary-based distribution (such as Ubuntu, Fedora, etc) make
17sure you install the -dev versions of these dependencies.
18
19You will also need a working C compiler environment for building Python
20modules (same as your Python version was built with).
21
22------------------------------------------------------------------------------
23
24Arch Linux Quickstart
25=====================
26
27Just install pysoy-hg from the AUR. You either download the source tarball,
28or you install it using a AUR wrapper like yaourt:
29 yaourt -S pysoy-hg
30
31This will also install libsoy-hg from AUR.
32
33Source tarball can be found here:
34http://aur.archlinux.org/packages.php?ID=47780
35
36------------------------------------------------------------------------------
37
38Fedora Quickstart
39=================
40
41 sudo yum install python3-devel
42 
43You need to get ez_install to install Sphinx
44 
45 sudo yum install python3-setuptools
46 
47You now need to install the latest Sphinx
48
49 sudo easy_install-3.3 -U Sphinx
50 
51You will also need libsoy installed.  See the Fedora Quickstart section in
52libsoy/INSTALL for dependency install instructions.
53
54Set Environment variables for waf to find soy-1.pc and libsoy.so.
55
56 echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib' >> ~/.bashrc
57 echo 'export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig' >> ~/.bashrc
58
59Let bash know the changes by doing:
60
61                 source ~/.bashrc
62
63Now you need to build PySoy using waf:
64
65                ./waf configure
66                ./waf build
67
68Finally install PySoy using:
69
70                sudo ./waf install
71
72If ./waf configure fails to find python3, try:
73                python3 ./waf configure
74                python3 ./waf build
75                sudo python3 ./waf install
76
77------------------------------------------------------------------------------
78
79Gentoo Quickstart
80=================
81
82 sudo emerge -av dev-python/sphinx
83
84You will also need libsoy installed.  See the Gentoo Quickstart section in
85libsoy/INSTALL for dependency install instructions.
86
87When libsoy is installed to /usr/local you will need to then:
88
89  PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./waf configure
90
91------------------------------------------------------------------------------
92
93Ubuntu Quickstart
94=================
95
96Start by building and installing libsoy (see libsoy/INSTALL).
97
98On Ubuntu 14.04 LTS or above:
99
100 sudo apt-get install python3-dev python3-sphinx
101 python3 waf configure build
102 sudo python3 waf install
103 echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib' >> ~/.bashrc
104 source ~/.bashrc
105 python3 examples/TenCubes.py
106
107------------------------------------------------------------------------------
108
109Compiling
110---------
111If you're reading this you've already downloaded PySoy.  If you have all
112the dependencies installed you should, now, be able to type:
113  python3 setup.py build
114
115and watch it compile.  Any compile errors not linked to a missing
116dependency should be reported to our bug tracker (below).
117
118If everything has gone well you can now install the PySoy module with:
119  sudo python3 setup.py install
120
121
122Updating
123--------
124If you've installed from Mercurial you should be able to update your version
125by changing to this directory and running:
126  hg pull -u
127
128Then repeat the compile steps (above).
129
130Troubleshooting
131---------------
132
133- I get the following error when attempting to build/install Pysoy:
134
135`
136Traceback (most recent call last):
137  File "setup.py", line 107, in <module>
138    extra_compile_args = ['-g'])
139  File "setup.py", line 59, in pkgconfig
140    raise OSError('Package(s) Not Found\n\n%s' % output)
141OSError: Package(s) Not Found
142`
143
144Package soy-1.0 was not found in the pkg-config search path.
145Perhaps you should add the directory containing `soy-1.0.pc'
146to the PKG_CONFIG_PATH environment variable
147No package 'soy-1.0' found
148`
149
150Add the directory containing `soy-1.0.pc` to your path.
151On my system, adding the following to my .bashrc file worked:
152
153export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
154
155`
156- I get the following error when attempting to import soy:
157
158% import soy
159ImportError: libsoy.so: cannot open shared object file: No such file or directory
160`
161
162The package can't be imported, because libsoy isn't in Python's sys.path.
163You can fix this by adding the installation dir (/usr/local/lib for me at least) to your LD_LIBRARY_PATH.
164This can be done by adding the following to your .bashrc file:
165
166export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
167
168or adding the path to /etc/ld.so.conf.
169
170Bug Reporting
171-------------
172There's a "New Ticket" link at the top of http://pysoy.org/ for reporting
173bugs.  You'll need to login to access it, registration should be quick
174and painless while helping us cut down on ticket spam and making it
175easier for us to contact you for more information.
176
177Please select the correct version when filing bug reports and, if
178building from Mercurial, mention the revision number and/or date of last
179update when writing your report.  This is very useful to us.
Note: See TracBrowser for help on using the repository browser.