- Python 2.7 or 3.x https://www.python.org/ or https://anaconda.org/
- Microsoft Visual Studio https://visualstudio.microsoft.com/downloads/
- Local copy of libecl
-
Download or clone the libecl Github repository to your local disk.
-
Python 2.7 or 3.x installation
- Download a python instalation or a python environment solution such as Anaconda.
-
Download and install Microsoft Visual Studio . At a minimum libecl requires the VS Studio packages for cmake, msbuild, c and c++ compilers (CL.exe).
-
Open a MSVC command prompt such as x64 Native Tools Command Prompt for VS 2017 from your start menu. In the open prompt, navigate to the libecl source directory you created in step 1. Use the Python package manager pip to install libecl requirements via
pip install -r requirements.txt
. If Python is not accessible from the prompt it may be necessary to add the Python environment location to your system path variablePATH
. -
Execute the build commands with the desired CMAKE parameters from
README.md
. The cmake generator can beNMake Makefiles
,Ninja
or an appropriate version ofMSVC
. For the availble options typecmake -G
in the MSVC command prompt.An example build and install is provided below where %VARIABLE% are user defined directory paths:
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_INSTALL_PREFIX=%INSTALLPATH% -DBUILD_SHARED_LIBS="ON" -DENABLE_PYTHON="ON" -DCMAKE_BUILD_TYPE="Release" %SOURCEPATH%
cmake --build %BUILDPATH% --config Release --target install
-
For libecl to be accessible in Python the
%INSTALLPATH%\lib\pythonX.Y\site-package
and Python subdirectories must be added to thePATH
andPYTHONPATH
variables. Wherepythonx.y
is the current Python version e.g. (python2.7
,python3.6
etc.) . -
Open a Python interactive session and run
import ecl
to check that the install and paths are now set.