If you have problem with some tests failing when building orekit, make sure you check the *petrushy/Orekit.git*
repository status and ensure that you have the correct branch checked out before compiling (as of writing, tested branch on Ubuntu 16.04 is *cs_93*).
After compilation is complete, go to "/Orekit/target/" and to find the **orekit-x.jar**
Clone the python wrapper repository: [Orekit-python-wrapper](https://gitlab.orekit.org/orekit-labs/python-wrapper.git)
Copy the contents of the "python_files" folder (from the python wrapper repository) to the folder where you intend to build the python library.
Then place all the **hipparchus-*.jar** files and your modified compiled **orekit-x.jar** in your build folder.
More specifically these files are needed:
* orekit-x.jar
* hipparchus-core-1.3.jar
* hipparchus-filtering-1.3.jar
* hipparchus-fitting-1.3.jar
* hipparchus-geometry-1.3.jar
* hipparchus-ode-1.3.jar
* hipparchus-optim-1.3.jar
* hipparchus-stat-1.3.jar
Set the environment variable for building:
`export SRC_DIR="my/orekit/build/folder"`
In this folder create a build.sh file with the following contents (remember to replace the **x**'es with the correct version compiled):
```bash
#!/bin/bash
python -m jcc \
--use_full_names\
--python orekit \
--version x \
--jar$SRC_DIR/orekit-x.jar \
--jar$SRC_DIR/hipparchus-core-1.3.jar \
--jar$SRC_DIR/hipparchus-filtering-1.3.jar \
--jar$SRC_DIR/hipparchus-fitting-1.3.jar \
--jar$SRC_DIR/hipparchus-geometry-1.3.jar \
--jar$SRC_DIR/hipparchus-ode-1.3.jar \
--jar$SRC_DIR/hipparchus-optim-1.3.jar \
--jar$SRC_DIR/hipparchus-stat-1.3.jar \
--package java.io \
--package java.util \
--package java.text \
--package org.orekit \
java.io.BufferedReader \
java.io.FileInputStream \
java.io.FileOutputStream \
java.io.InputStream \
java.io.InputStreamReader \
java.io.ObjectInputStream \
java.io.ObjectOutputStream \
java.io.PrintStream \
java.io.StringReader \
java.io.StringWriter \
java.lang.System \
java.text.DecimalFormat \
java.text.DecimalFormatSymbols \
java.util.ArrayList \
java.util.Arrays \
java.util.Collection \
java.util.Collections \
java.util.Date \
java.util.HashMap \
java.util.HashSet \
java.util.List \
java.util.Locale \
java.util.Map \
java.util.Set \
java.util.TreeSet \
--module$SRC_DIR/pyhelpers.py \
--reserved INFINITE \
--reserved ERROR \
--reserved OVERFLOW \
--reserved NO_DATA \
--reserved NAN \
--reserved min \
--reserved max \
--reserved mean \
--build\
--install
```
This command is taken from the *conda-recipe*[build.sh](https://gitlab.orekit.org/orekit-labs/python-wrapper/blob/master/orekit-conda-recipe/build.sh) file.
Make the file executable
`chmod +x build.sh`
Run the build file
`./build.sh`
This may take some time
Check installation by
`pip freeze`
it should output:
```bash
JCC==3.4
orekit==9.2
```
Then install some additional libraries
`pip install scipy`
`pip install matplotlib`
`pip install pytest`
Make sure that you test that the installation and compilation worked.
Enter into the "test" folder (should have been part of the "python_files" folder) and run: