Abstract
This document explains the different ways for obtaining a running pyFormex installation. You will learn how to obtain pyFormex, how to install it, and how to get it running.
There are several ways to get a running installation of pyFormex, and you may choose the most appropriate method for you, depending on your needs, your current infrastructure and your computer knowledge. We will describe them in detail in this document, and advice you on which method might be the best in your case.
Note
pyFormex on non-Linux systems
pyFormex is being developed on GNU/Linux systems, and most users run it on a GNU/Linux platform. The Running pyFormex on non-Linux systems section holds information on how pyFormex can be run on other platforms.
Let’s first give you an overview of the most important pros and cons of the different install methods.
PROS | CONS |
---|---|
|
|
PROS | CONS |
---|---|
|
|
PROS | CONS |
---|---|
|
|
PROS | CONS |
---|---|
|
|
To sum it up:
pyFormex is software under development, and many users run it directly from the latest development sources. This holds a certain risk however, because the development version may at times become unstable or incompatible with previous versions and thus break your applications. At regular times we therefore create official releases, which provide a more stable and better documented and supported version, together with an easy install procedure.
If you can meet the requirements for using an officially packed release, this is the recommended way to install pyFormex. All the software packages needed to run pyFormex can be obtained for free.
To install an official pyFormex release, you need a working GNU/Linux system, root (administrator) privileges to the system, and you need to make sure that the prerequisite packages are installed on the system.
If you need to install a new GNU/Linux system from scratch, and have the choice to pick any distribution, we highly recommend Debian GNU/Linux or derivatives. This is because most of the pyFormex development is done on Debian systems, and we will give you precise install instructions for this system. Also, the Debian software repositories are amongst the most comprehensive to be found on the Internet.
Most popular GNU/Linux distributions provide appropriately packed recent versions of these prerequisites, so that you can install them easily from the pacakge manager of your system. In case a package or version is not available for your system, you can always install it from source. We provide the websites where you can find the source packages.
In order to install an official release package of pyFormex, you need to have the following installed (and working) on your computer:
If you only want to use the Formex data model and transformation methods and do not need the GUI, then NumPy is all you need. This could e.g. suffice for a non-interactive machine that only does the numerical processing. The install procedure however does not provide this option yet, so you will have to do the install by hand. Currently we recommend to install the whole package including the GUI. Most probably you will want to visualize your structures and for that you need the GUI anyway.
Additionally, we recommend you to also install the GNU C-compiler and the Python and OpenGL header files. The install procedure needs these to compile the pyFormex acceleration library. While pyFormex can run without the library (Python versions will be substituted for all functions in the library), using the library will dramatically speed up some low level operations such as drawing, especially when working with large structures .
Debian users should just have to install the packages python-numpy and python-qt4-gl. The latter will install python-qt4 and python-qt4-gl as dependencies. Also, for compiling the acceleration library, you should install python-dev, python-qt4-dev and libglu1-mesa-dev.
Other optional packages that might be useful are admesh, python-scipy, python-numpy-ext, units.
Official pyFormex releases can be downloaded from this website: Releases. As of the writing of this manual, the latest release is 0.8.4.
pyFormex is currently distributed in the form of a .tar.gz (tarball) archive. See Install pyFormex for how to proceed further with the downloaded file.
Once you have downloaded the tarball, unpack it with the command
tar xvzf pyformex-VERSION.tar.gz
where you replace VERSION with the correct version from the downloaded file. Then go to the created pyformex directory
cd pyformex-VERSION
and execute the following command with root privileges:
python setup.py install --prefix=/usr/local
This will install pyFormex under /usr/local/. You can change the prefix to install pyFormex in some other place.
The installation procedure installs everything into a single directory, and creates a symlink to the executable in /usr/local/bin. You can use the command
pyformex --whereami
to find out where pyFormex is installed.
Finally, a pyFormex installation can usually be removed by giving the command
pyformex --remove
and answering ‘yes’ to the question. You may want to do this before installing a new version, especially if you install a new release of an already existing version.
pyFormex uses a large number of external software packages to enhance its functionality. Some of these packages are so essential, that they were listed as requirements. Others however are merely optional packages: interesting for those users who need them, but not essential for everybody. The user has the choice to install these extras or not.
Some external packages however do not come in an easy to install package, or the available packaged formats do not collaborate well with pyFormex. Therefore, we have created a set of dedicated install script to ease the installation of these external packages. Currently, there is an install procedure for the following packages:
Warning
We provide these installation procedures for your convenience, but take no responsibility for them working correctly.
To install any of these packages, proceed as follows. Go to the directory where you unpacked the pyFormex distribution: cd pyformex-version. Then go to the pyformex/external subdirectory, where you will find a subdirectory for each of the above packages. Go into the directory of the package you wish to install and execute the following command (with root privileges): ./PACKAGENAME.install all
All these procedures will install under /usr/local. If you wish to change this, you will have to change the install procedure. The install procedures can also be sued to perform only part of the installation process. Thus, ./PACKAGENAME.install get unpack will only download and unpack that package. See the README files and the install procedures themselves for more info.
Official release are only created a couple of times per year, because they require a lot of testing. pyFormex is however developing fast, and as soon as an official release has been made, new features are already being included in the source repository. Sometimes, you may be in need of such a feature, that will only become officially available within several months. Between successive official releases, we create interim alpha releases. They are less well tested (meaning they may contain more bugs) and supported than the official ones, but they may just work well for you.
These alpha releases can be downloaded from the developer FTP site or from our local FTP server. The latter may be slower, but you may find there some old releases or release candidates that are not available on the official server.
They install just like the Official release.
If the install procedures for the packaged releases do not work for you, or if you want to have the absolutely latest features and bug fixes, then you can run pyFormex directly from the development sources. Obviously, the pyFormex developers use this method, but there are also several normal users who prefer this, because it allows for easy updating to the latest version.
To run pyFormex from the development sources you need to have the same prerequisites installed as for the Official release. Furthermore, you need the Subversion revision control system. You can check whether you have it by trying the command svn help. If you do not have the command, you should install Subversion first. Debian and Ubuntu users can just do apt-get install subversion.
Now you can anonymously check out the latest pyFormex version from the Source code repository at the Project page. You can do this with the command
svn co svn://svn.savannah.nongnu.org/pyformex/trunk/pyformex MYDIR
in which you replace MYDIR with the path name of a directory where you have write permission. Most users choose ~/pyformex as the checkout directory, but this is not required. You can even check out different versions under different path names. If you leave out the MYDIR from the above command, a new directory pyformex will be created in the current path.
Now change into the created MYDIR directory and execute the command ./pyformex. The latest pyFormex version should startup. The acceleration library will however not be available yet. To create the library, goto to the lib subdirectory and execute the command ./configure;make.
You can make the pyformex command in your checked out tree executable from anywhere by creating a symlink under one of the directories in you PATH setting. An example command to achieve this: ln -sfn MYDIR/pyformex/pyformex /home/user/bin
You can update this pyFormex installation at any time to the latest version by issuing the command svn update in your MYDIR/pyformex directory. You can even roll back to any older revision of pyFormex. Just remember that after updating your sources, the compiled library could be out of sync with your new sources. Rebuild the library just like specified above.
If you do not have access to a running GNU/Linux system, or if the above installation methods fail for some unknown reason (remember, you can ask for help on the pyFormex Support tracker), you can still run pyFormex by using a Bumpix Live GNU/Linux system. Bumpix Live is a full featured Debian GNU/Linux system including pyFormex that can be run from a single removable medium such as a CD or a USB key. Installation instructions can be found in BuMPix Live GNU/Linux system.
Alternatively,
you may be happy to know that we can provide ready-made BuMPix USB sticks with the pyformex.org logo at a cost hardly exceeding that of production and distribution. If you think this is the right choice for you, just email us for a quotation.
Further guidelines for using the BuMPix system can be found in BuMPix Live GNU/Linux system.
pyFormex is being developed on GNU/Linux platforms, and most of its users run pyFormex on a GNU/Linux system. Because of that, there is no installation procedure to run pyFormex natively on other systems.
Currently, the easiest way to run pyFormex on a non-Linux system is by using the BuMPix Live GNU/Linux system. We use this frequently with large groups of students in classes having only Windows PCs. We also have some professional users who could no install GNU/Linux due to corporate regulations, that are working this way.
Another possibility is to run a virtual GNU/Linux instance on the platform. There is currently quite good virtualization software available for nearly any platform.
However, as all the essential underlying packages on which pyFormex is built are available for many other platforms (including Windows, Mac), it is (in theory) possible to get pyFormex to run natively on non-Linux platforms. There has already been a successful attempt with a rather old version, but with recent versions nobody has (yet) taken the bother to try it.
Note
pyFormex on Windows Lately there have been some successful attempts to get the basic functionality of pyFormex running on Windows. Thomas Praet has compiled this document on how to proceed. Submit a request on the Support tracker if you need any help.
There may be a few things that have to be changed to successfully run pyFormex on other platforms (especially on Windows), but it should all be rather obvious. If you have some programming experience on your platform, and you want to give it a try, please do so. We certainly are willing to help where we can. And we are certainly interested in feedback about your attempt, whether successful or not.