machinalis / iepy

Information Extraction in Python
BSD 3-Clause "New" or "Revised" License
906 stars 186 forks source link

java Permission denied #87

Closed jiffies closed 8 years ago

jiffies commented 9 years ago

After install iepy in a virtualenv environment,I get this error:

(iepy)lcq@27:~$ iepy -h
Traceback (most recent call last):
  File "/home/lcq/.virtualenvs/iepy/bin/iepy", line 7, in <module>
    from iepy.instantiation.command_line import execute_from_command_line
  File "/home/lcq/.virtualenvs/iepy/lib/python3.4/site-packages/iepy/instantiation/command_line.py", line 27, in <module>
    from iepy.preprocess.corenlp import download as download_corenlp
  File "/home/lcq/.virtualenvs/iepy/lib/python3.4/site-packages/iepy/preprocess/corenlp.py", line 28, in <module>
    JAVA_VERSION = detect_java_version()
  File "/home/lcq/.virtualenvs/iepy/lib/python3.4/site-packages/iepy/preprocess/corenlp.py", line 24, in detect_java_version
    jversion = subprocess.check_output([java_cmd, "-jar", jar], stderr=subprocess.STDOUT)
  File "/home/lcq/.pythonz/pythons/CPython-3.4.3/lib/python3.4/subprocess.py", line 607, in check_output
    with Popen(*popenargs, stdout=PIPE, **kwargs) as process:
  File "/home/lcq/.pythonz/pythons/CPython-3.4.3/lib/python3.4/subprocess.py", line 859, in __init__
    restore_signals, start_new_session)
  File "/home/lcq/.pythonz/pythons/CPython-3.4.3/lib/python3.4/subprocess.py", line 1457, in _execute_child
    raise child_exception_type(errno_num, err_msg)
PermissionError: [Errno 13] Permission denied

It looks like java can't be run.But I can run it from shell.

(iepy)lcq@27:~$ java -version
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar 
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

This is my java profile

export JAVA_HOME=/home/lcq/jdk1.8.0_60/
export JAVAHOME=$JAVA_HOME
export JRE_HOME=${JAVA_HOME}/jre 
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib 
export PATH=${JAVA_HOME}/bin:$PATH

I use ubuntu 15.04 and python 3.4.3.Could you help me ?

jiffies commented 9 years ago

I got it. JAVAHOME must be java executiable itself.Not the folder.And Picked up JAVA_TOOL_OPTIONS is a extra problem,need to be remove.I use ugly method unset JAVA_TOOL_OPTIONS.

jmansilla commented 8 years ago

it seems that you solved ut by yourself. I'm closing this issue