0

I am trying to install jep system-wide from pip3 by the following command

sudo pip3 install jep

I get the following error:

 Complete output from command python setup.py egg_info:
    Error:
    Please set the environment variable JAVA_HOME to a path containing the JDK.    

Command

python setup.py egg_info failed with error code 1 in /tmp/pip-install-t9lhbx74/jep/

I have already installed openjdk-14 using apt because jep supports Java => 1.3. My bashrc has the following lines:

export JAVA_HOME=/usr/lib/jvm/java-14-openjdk-amd64/

Then I tried to reconfigure java by using

    sudo update-alternatives --config java
There is only one alternative in link group java (providing /usr/bin/java): /usr/lib/jvm/java-14-openjdk-amd64/bin/java.
Nothing to configure.

I tried solution from follwoing questions but no luck:

Question 1

Question 2

Here are some helpful details if requried:

  1. Ubuntu 19.10
  2. Python3 = 3.8 default (3.7 also available being used application specific)
  3. pip3 = pip 19.3.1 from /usr/local/lib/python3.8/dist-packages/pip (python 3.8)
  4. Java = openjdk 14-ea 2020-03-17 OpenJDK Runtime Environment (build 14-ea+18-Ubuntu-1) OpenJDK 64-Bit Server VM (build 14-ea+18-Ubuntu-1, mixed mode, sharing)
2
  • 3
    sudo does an env_reset by default - you can try sudo --preserve-env=JAVA_HOME pip3 install jep or switch to an interactive root shell and export the variable there Jan 15, 2020 at 13:06
  • That worked! Thanks! I can't mark your comment as an answer.
    – skad00sh
    Jan 16, 2020 at 2:13

0

You must log in to answer this question.

Browse other questions tagged .