Python orekit wrapper v9.3.1 available

#1

Hi,

The orekit python wrapper for orekit 9.3.1 is now available on the code repo as well as build pre-made conda packages for most platforms.

The updated version is based on the release version of orekit 9.3.1 with its GPS week rollover fix.

In addition there are a number of python related fixes in this version:

  • It’s based on JCC 3.5 that includes a minor fix related to Python 3.7 and some IDE’s
  • Includes bug fix in PythonOrekitStepHandler
  • Included python test case for InterSatDirectViewDetector, OrekitStepHandler

A large number of python-extension classes is included, basically for all external usable interfaces and abstract classes in orekit. All such wrapping classes without a test case shall be considered experimental.

For documentation particular for the python aspects, I recommend looking at the test cases.

As previously, the recommended installation method is the conda packages from conda forge:

Best Regards
/Petrus

0 Likes

#2

Petrus,
I used conda to install the latest wrapper but running my test program in Spyder I get:
runfile(‘C:/Crumpton/Python_Orekit/pyOrekitTest.py’, wdir=‘C:/Crumpton/Python_Orekit’)
Traceback (most recent call last):

File “”, line 1, in
runfile(‘C:/Crumpton/Python_Orekit/pyOrekitTest.py’, wdir=‘C:/Crumpton/Python_Orekit’)

File “C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py”, line 786, in runfile
execfile(filename, namespace)

File “C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py”, line 110, in execfile
exec(compile(f.read(), filename, ‘exec’), namespace)

File “C:/Crumpton/Python_Orekit/pyOrekitTest.py”, line 9, in
import orekit

File “C:\ProgramData\Anaconda3\lib\site-packages\orekit_init_.py”, line 3, in
from . import _orekit

ImportError: DLL load failed: The specified module could not be found.

I verified that the files are in:
C:\ProgramData\Anaconda3\Lib\site-packages\orekit

Any help would be appreciated. Thanks.

Stephen Crumpton

0 Likes

#3

Hi Stephen,

The very most likely cause is that you have not activated your conda environment, and thus your environment variables are not set.

Activation of environment can be done by:

  • launching spyder (or other app) from the anaconda navigator interface
  • launching it from an activated prompt (either through anaconda prompt or through “conda activate env”)
  • pointing the spyder executable at a python that activate the environment automatically through the conda-wrapper, see installation instructions:
    https://gitlab.orekit.org/orekit-labs/python-wrapper/wikis/installation
  • or set them directly in your environment by hand, but this misses a bit of the point with the relocatable conda enviroment.

Best Regards
/Petrus

0 Likes

#4

Thanks. That worked. I am at a new company and setting up a new laptop and I do not recall all the steps to get these things configured. (I am making note of them now!)

0 Likes