两大步:
一、安装jdk
ubuntu 下安装 jdk
- 下载 jdk :
https://www.oracle.com/technetwork/java/javase/downloads/index.html
2. 解压 jdk 到系统默认 jdk 路径:
sudo tar -zxvf jdk-8u191-linux-x64.tar.gz -C /usr/lib/jvm
- vim ~/.bashrc 追加
# set oracle jdk environment
export JAVA_HOME="/usr/lib/jvm/jdk1.8.0_191"
export JRE_HOME="$JAVA_HOME/jre"
export CLASSPATH=".:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH"
export PATH="$JAVA_HOME/bin:$PATH"
-
source ~/.bashrc
source ~/.bashrc
二、安装JPype1
pip install JPype1