I don't know if it's common to use Python in the WEB composed of JSP and JAVA, but in the recent project
I needed a function to run python scripts in JAVA and get a result value.
Previously, I analyzed which one of "Jython" and "JEP" fits the project, and finally selected JEP, and explains how to install JEP on Linux.
1. Installation of the Open JDK
This is too easy for a developer, so replace it with a command.
(Above all, you need to install a JDK that you want and that JEP supports.)
"sudo yum install -y jasudo yum install –y java-1.8.0-openjdk-devel.x86_64"
2. Set the "JAVA_HOME" Variable
To install JEP, You will need to set an environment variable to the Your Java installation directory.
"sudo su"
"vi /etc/profile"
"export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.xxx.b10-0.amzn2.0.1.x86_64/"
3. Installation of the Python3 and Python3-devel
Install Python for JEP execution. If this is the caIt is recommended to install Python version 3. Because I have no experience with version 2. ㅡㅡ......
"sudo yum install python3"
"sudo yum install "python3-devel"
If you try to install "JEP" without installing "Python-devel", an error saying "Python.h" does not exist is displayed.
4. Installation of the GCC
Install the compiler required to run Python scripts with User Privilege.
"sudo yum install gcc"
5. Installation of the JEP
Install the necessary programs and install Jep. Change the account to root and execute below.
“python3 –m pip install jep”.
When the installation is completed normally, the location where “jep” is installed is as follows.
/usr/local/lib64/python3.7/site-packages/jep
If the installation is successful, the console window will be displayed as if you had entered “jep” in the user account.
Next time, we will look at tomcat setting for jep operation.
To be continue...
'IT' 카테고리의 다른 글
[IT] Spring Tool Suite Dark Theme (or Eclipse?) for your eye (0) | 2020.10.07 |
---|---|
[AWS] 504 Gateway Time-out 에러에 대해 (0) | 2020.10.06 |
[IT] If <spring:message> arguments is not working for variable... (0) | 2020.06.12 |
[IT] XMLTools.dll is not compatible with the current version of Notepad++ (0) | 2020.05.13 |
[IT] JEP과 Jython (0) | 2019.05.31 |