程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Building Python environment under Linux system

編輯:Python

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):


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved