git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8665 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -104,7 +104,7 @@ system.
|
||||
|
||||
<A NAME = "py_2"></A><H4>11.2 Installing the Python wrapper into Python
|
||||
</H4>
|
||||
<P>For Python to invoke LAMMPS, there are 2 files it needs to have:
|
||||
<P>For Python to invoke LAMMPS, there are 2 files it needs to know about:
|
||||
</P>
|
||||
<UL><LI>python/lammps.py
|
||||
<LI>src/liblammps.so
|
||||
@ -133,19 +133,28 @@ python/lammps.py file.
|
||||
</P>
|
||||
<PRE>% python install.py <B>libdir</B> <B>pydir</B>
|
||||
</PRE>
|
||||
<P>The optional libdir is where to copy the LAMMPS shared library to;
|
||||
the default is /usr/local/lib. The optional pydir is where to copy
|
||||
the lammps.py file to; the default is the site-packages directory
|
||||
of the Python running the install script.
|
||||
<P>The optional libdir is where to copy the LAMMPS shared library to; the
|
||||
default is /usr/local/lib. The optional pydir is where to copy the
|
||||
lammps.py file to; the default is the site-packages directory of the
|
||||
version of Python that is running the install script.
|
||||
</P>
|
||||
<P>Prefix the python command with "sudo" if it does not allow you to copy
|
||||
files into system directories. If you do this, make sure that the
|
||||
Python that root runs is the same as the Python you run. E.g. you may
|
||||
need to do something like
|
||||
<P>Note that libdir must be a location that is in your default
|
||||
LD_LIBRARY_PATH, like /usr/local/lib or /usr/lib. And pydir must be a
|
||||
location that Python looks in by default for imported modules, like
|
||||
its site-packages dir. If you want to copy these files to
|
||||
non-standard locations, such as within your own user space, you will
|
||||
need to set your PYTHONPATH and LD_LIBRARY_PATH environment variables
|
||||
accordingly, as above.
|
||||
</P>
|
||||
<P>If the instally.py script does not allow you to copy files into system
|
||||
directories, prefix the python command with "sudo". If you do this,
|
||||
make sure that the Python that root runs is the same as the Python you
|
||||
run. E.g. you may need to do something like
|
||||
</P>
|
||||
<PRE>% sudo /usr/local/bin/python install.py <B>libdir</B> <B>pydir</B>
|
||||
</PRE>
|
||||
<P>You can also invoke install.py from the src directory as
|
||||
<P>You can also invoke install.py from the make command in the src
|
||||
directory as
|
||||
</P>
|
||||
<PRE>% make install-python
|
||||
</PRE>
|
||||
|
||||
Reference in New Issue
Block a user