Orekit Python Wrapper version 9.0 released

Added by Petrus Hyvönen 11 months ago

The python wrapped version of orekit 9.0 is now available, containing all the updates in the orekit 9.0 java version. The pure source code is available in the repo but I strongly recommend to use conda packages if possible, it can sometimes be tricky to get all the wrapping to compile. The new version is automatically built for windows, mac and linux for python 2.7, 3.5 and 3.6 and placed on the conda-forge channel.

The new conda package is depending on the JCC package that will automatically be installed and has scripts that sets the needed environment variables when the conda environment is activated. Note that this means that external scripts needs to activate the conda environment prior to running python or by using "conda-wrappers". This gives a cleaner interaction with the environment than then 8.0 version that would affect PATH variables on windows.

To install orekit python in anaconda, type:

conda install -c conda-forge orekit

Packages for manual download are available at: https://anaconda.org/conda-forge/orekit

Limited documentation and examples for the wrapper is available at: https://www.orekit.org/forge/projects/orekit-python-wrapper


Comments

Added by Yongjun Moon 10 months ago

Thank you for your efforts.

I need your help for initial settings.

OS: Windows 10 64 bit
Python: 2.7 (installed from the latest version of Anaconda)

The installation was perfect.
I typed "conda install -c conda-forge orekit" in the Anaconda Prompt.
The problem occured whey I tried to import orekit.

In the ipython console of spyder, I typed "import orekit" then got "ImportError: DLL load failed."
I think this is related with _orekit.pyd's dll, but don't know how to fix it.

Do I have to do something with Java environment settings?

Thank you.

Added by Yongjun Moon 10 months ago

Sorry, I didn't consider "Note that this means that external scripts needs to activate the conda environment prior to running python or by using "conda-wrappers"."
Executing spyder in the Anaconda Prompt works.

Is there another way to automatically set those environments when I run spyder with spyder.exe?
Thank you.

Added by Petrus Hyvönen 7 months ago

Hi,

Sorry didn't see your questions until now.

In case you haven't already solved it, yes it is possible to set the environment parameters by hand in a script or directly in the machine settings.

Check the windows section at the FAQ at https://www.orekit.org/forge/projects/orekit-python-wrapper/wiki/FAQ
It is JCCJDK and PATH that needs to be modified, if you follow the FAQ you need to set the JCCJDK to the java-jdk located in your anaconda installation under the library folder.

The activation scripts used for the conda package are in the JCC package, and can be reused, check:
https://github.com/conda-forge/jcc-feedstock/tree/master/recipe/scripts

Regards