Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows installation #14

Closed
dg46 opened this issue Nov 4, 2021 · 3 comments
Closed

Windows installation #14

dg46 opened this issue Nov 4, 2021 · 3 comments
Assignees

Comments

@dg46
Copy link
Collaborator

dg46 commented Nov 4, 2021

Continuous integration pipeline works on ubuntu image, but changing to windows image results in errors (first is Java related, then some issue with multithreading in pytest when the unit tests are run). I am using cause2e on a windows machine for my own analyses, so I know that it can work. Will fix the pipeline so that CI ensures that cause2e is in a usable state for linux and windows users.

@dg46 dg46 self-assigned this Nov 4, 2021
@dg46
Copy link
Collaborator Author

dg46 commented Nov 5, 2021

For the Java issue: This is a known issue with javabridge (required by py-causal in the causal discovery step).
As explained here, make sure you have JAVA SDK 8 installed and set your JAVA_HOME and JDK_HOME environment variables correctly. See cause2e's azure-pipelines.yml for an example.


Edit: The following more detailed instruction hopefully helps:

  • make sure you are using Python >= 3.7
  • remove artifacts from previous installation attempts:
    -- remove all Java installations (runtimes, JDKs, SDKs...)
    -- remove javabridge, py-causal and cause2e installations (via pip uninstall)
    -- remove JAVA_HOME and JDK_HOME from environment variables (if you have set them before)
  • install Java (use the "offline-version" installer, as the online installer might install 32bit when you actually need 64bit)
  • download JDK 8
  • set JAVA_HOME and JDK_HOME variables to point to the directories where the Java runtime and the JDK are located
  • install Visual C++ 2013
  • install javabridge (from PyPI), py-causal (from https://github.com/bd2kccd/py-causal) and cause2e (from PyPI) in this order; do not try "pip install pycausal", as this will install the wrong package

If you still get errors (look at pip output during javabridge installation, it should install version 1.0.19 without complaining), check this file for the corresponding error message. You will see where javabridge expects certain Java files to be. Use this to set JAVA_HOME and/or JDK_HOME accordingly before reinstalling javabridge.

As a reference, our azure pipeline correctly installs cause2e, after setting JDK_HOME. For further debugging, try comparing your set up with the software that is pre-installed on the build image.

@dg46
Copy link
Collaborator Author

dg46 commented Nov 5, 2021

For the pytest issue: This seems related to the problem. Despite the continuing error messages, I was able to make all unit tests run as intended by removing a blocker in heatmap plotting. Since the issue only occurs in the CI pipeline, it should not cause problems to users.

@dg46
Copy link
Collaborator Author

dg46 commented Nov 5, 2021

The issue will be closed once I have merged the changes into the main branch.

@dg46 dg46 mentioned this issue Nov 8, 2021
@dg46 dg46 closed this as completed Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant