diff --git a/README.md b/README.md index 9d20d17..3fc9eae 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,26 @@ Alternatively, you can install the `eif` R package from [here](https://github.co No extra requirements are needed. In addition, it also contains means to draw the trees created using the [igraph](http://igraph.org/) library. See the example for tree visualizations. +## Conda Environment instructions for Windows 10 + +Before creating the conda environment make sure the Microsoft Visual C++ 14.0 build tools is installed. +1. Download the installer from [Visual Studio website](https://visualstudio.microsoft.com/visual-cpp-build-tools/). +2. Select `C++ build tools` from the main menu + +Then from the PowerShell +``` +(base)> cd eif +(base)> conda env create -f conda_env.yml +(base)> conda acitvate eif-devenv +(eif-devenv)> pip install . +``` +(Optional) In case you want to use the Jupyter notebooks: +``` +(eif-devenv)> conda install jupyter matplotlib scipy seaborn scikit-learn +(eif-devenv)> cd Notebooks +(eif-devenv)> jupyter notebook +``` + ## Use See these notebooks for examples on how to use it diff --git a/conda_env.yml b/conda_env.yml new file mode 100644 index 0000000..d2dd011 --- /dev/null +++ b/conda_env.yml @@ -0,0 +1,8 @@ +name: eif-devenv +channels: + - defaults + - conda-forge +dependencies: + - python==3.7 + - cython==0.29.20 + - numpy==1.18.5 \ No newline at end of file diff --git a/eif.hxx b/eif.hxx index 9c0c23a..b405d40 100644 --- a/eif.hxx +++ b/eif.hxx @@ -5,6 +5,7 @@ #include #include #include +#include #define EULER_CONSTANT 0.5772156649 diff --git a/setup.py b/setup.py index 8aba6fd..be10c2e 100644 --- a/setup.py +++ b/setup.py @@ -15,6 +15,11 @@ def read(filename): return open(os.path.join(prjdir, filename)).read() +if sys.platform.startswith("win"): + compilation_flags = ['/std:c++latest'] +else: + compilation_flags = ['-std=c++11', '-Wcpp'] + extra_link_args = [] libraries = [] library_dirs = [] @@ -29,7 +34,7 @@ def read(filename): ext_modules=[Extension("eif", sources=["_eif.pyx", "eif.cxx"], include_dirs=[numpy.get_include()], - extra_compile_args=['-std=c++11', '-Wcpp'], + extra_compile_args=compilation_flags, language="c++")], scripts=[], py_modules=['eif_old', 'version'],