In this tutorial we learn how to install Klamp't, step by step.
Difficulty: easy
Time: 10-30 minutes
To install the Klamp't Python bindings:
- Install Python 2.7+ or 3.7+ from http://www.python.org/getit/. Both 32-bit (x86) and 64-bit (x64) versions are supported.
- Install Klampt using
pip install klampt
- Install PyOpenGL using
pip install PyOpenGL
, or use the Win32 installer from https://pypi.python.org/pypi/PyOpenGL/. - Install PyQt5 or PyQt4. In Python 3.x this is easy as
pip install PyQt5
, but users of Python 2.x will need to download the appropriate unofficial PyQt4 build here.
You're done! As a test, run "cmd" from the start menu,
git clone http://github.com/krishauser/Klampt-examples
cd Klampt-examples/Python/demos
python gl_vis.py
To run apps and obtain the C++ include/static library files:
- First, install the x86 version of the Visual Studio 2015 Runtime.
- Run the Klamp't installer.
- Optionally, install ffmpeg from this binary build, which will help you compile animations into MPEG movies.
Due to the complexities of dependency management on Windows, building from source is much more challenging and not recommended unless you have extensive experience building packages on Windows via CMake. These instructions are also bound to go out of date occasionally.
- Install CMake.
- Obtain Visual Studio 2015.
- Visit https://github.com/krishauser/Klampt and click "Clone on Desktop". Follow the on-screen instructions to download Git, if necesary, and clone the Klamp't Git repository.
- Following the same steps as above, clone the KrisLibrary Git repository from https://github.com/krishauser/KrisLibrary to the Klampt/Cpp/Dependencies folder as the target location.
- From http://klampt.org, download the appropriate Win32 Klamp't dependencies for your Visual Studio version (both Release and Debug are recommended). Unpack into Klampt/Cpp/Dependencies.
- Run cmake-gui in your Klamp't folder, and set the build directory to Klampt/msvc. Correct any paths that cannot be found, and generate the Visual Studio project files.
- Open Klampt/msvc/Klampt.sln and build the "Klampt" and "apps" projects in Visual Studio.
- To build the Python bindings:
- Copy Klampt/msvc/Python/setup.py into your Klampt/Python folder.
- Run the Visual Studio Command prompt as an administrator and navigate to Klampt/Python.
- For VS 2015 you must first enter "set VS90COMNTOOLS=%VS140COMNTOOLS%".
- Run "python setup.py install".