Open rcoconnell opened 5 years ago
Did you install with 'python setup.py install' at the py-causal folder? Try to call it at python prompt. I think conda installs the library in a different place. If you want to run it on Jupyter notebook, try it on Docker: https://hub.docker.com/r/chirayukong/py-causal-notebook.
I get similar results from running setup.py and from running pip install git+git://github.com/bd2kccd/py-causal
,
/Users/rcoconne/anaconda2/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
#warning "Using deprecated NumPy API, disable it by " \
^
_javabridge.c:527:10: fatal error: 'jni.h' file not found
#include "jni.h"
^~~~~~~
1 warning and 1 error generated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/Users/rcoconne/anaconda2/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/bd/rbkf2ts97j15tpt46_ttzzcc0000gn/T/pip-install-xRQMzq/javabridge/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/bd/rbkf2ts97j15tpt46_ttzzcc0000gn/T/pip-record-fGYOdx/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/bd/rbkf2ts97j15tpt46_ttzzcc0000gn/T/pip-install-xRQMzq/javabridge/
Is a missing jni.h
some kind of Java problem? I'm on OS X 10.14.5, if it's relevant.
Like I said, I'm not on Ubuntu :)
I have some experience hacking things together in Python, and absolutely none in Java. Do I need to install the JDK in order to run your package? If so, it would be helpful to indicate that in the installation instructions. Do I want Java 11 or Java 12, OpenJDK or Sun, does any of that matter, etc.?
Definitely, you do need JDK. The library was coded in Java. OpenJDK or Oracle should do the trick as long as its version is 8 or more.
I had trouble installing through Anaconda. I ran through the steps described in the "Anaconda/Jupyter" section of the Readme, and found that I was able to import pydot, but not graphviz (not sure if this matters?) or pycausal.
The output from
conda list
included the following:At this point I could import pydot, but not graphviz or pycausal.
Poking around a little bit, it sounded like
conda install graphviz
doesn't install python bindings for graphviz, so I ranpip install graphviz
.conda list
now includesand I can now
import graphviz
successfully. Unfortunately, pycausal is still borked:Any guidance?