A recent one java Old projects to be deployed , There are references in the program python Scripts perform task operations , Therefore need python Running environment , The following notes are made for the operation process :
------python Environment building
anaconda download
https://www.anaconda.com/products/distribution#Downloads
Install package upload
[[email protected] /]# ll /home/soft/
total 594416
-rwxr-xr-x 1 root root 608680744 Apr 28 10:35 Anaconda3-2021.11-Linux-x86_64.sh
Executive authority
[[email protected] soft]# chmod 755 Anaconda3-2021.11-Linux-x86_64.sh
Start installation ( Installation path not specified )
[[email protected] soft]# sh Anaconda3-2021.11-Linux-x86_64.sh
Configure environment variables
[[email protected] etc]# vi /etc/profile
JAVA_HOME=/usr/local/java/jdk1.8.0_202
CONDA_HOME=/root/anaconda3
CLASSPATH=.:$JAVA_HOME/lib.tools.jar
PATH=$CONDA_HOME/bin:$JAVA_HOME/bin:$PATH
export JAVA_HOME CLASSPATH PATH
Configuration takes effect
[[email protected] etc]# source /etc/profile
Check the installation location
[[email protected] etc]# which python
Install missing class libraries
[[email protected] etc]# conda install scikit-learn
Resolve the following errors
[Togeek]2022-04-28 09:41:05 [Thread-16] INFO com.xxx.util.StreamGobbler - ERROR> File "/xxx/python_cmd.py", line 2, in <module>
[Togeek]2022-04-28 09:41:05 [Thread-9] INFO com.xxx.jdbc.JDBC - -----------------------before acquire connection: 5c922401-da60-42c0-9af0-3a6f92ef5d36
[Togeek]2022-04-28 09:41:05 [Thread-16] INFO com.xxx.util.StreamGobbler - ERROR> from sklearn.cluster import DBSCAN
[Togeek]2022-04-28 09:41:05 [Thread-16] INFO com.xxx.util.StreamGobbler - ERROR>ModuleNotFoundError: No module named 'sklearn'
[Togeek]2022-04-28 09:41:05 [Thread-23] INFO com.xxx.util.StreamGobbler - ERROR>Traceback (most recent call last):