|
@@ -6,25 +6,33 @@
|
|
|
|
|
|
CentOS7默认软件源中没有Python3,要安装Python3需首先安装epel软件源,非root账户下请使用 sudo yum install epel-release 。
|
|
|
```
|
|
|
-[root@localhost ~] yum install epel-release
|
|
|
+[root@localhost ~] yum install -y epel-release
|
|
|
```
|
|
|
|
|
|
使用 yum 安装 Python3
|
|
|
|
|
|
```
|
|
|
-[root@localhost ~] yum install python36
|
|
|
+[root@localhost ~] yum install -y python36
|
|
|
```
|
|
|
|
|
|
### 安装 Python 依赖库
|
|
|
使用 pip3 命令安装项目需要用到的 Python 依赖库
|
|
|
```
|
|
|
-[root@localhost ~] pip3 install vg
|
|
|
-[root@localhost ~] pip3 install numpy
|
|
|
-[root@localhost ~] pip3 install matplotlib
|
|
|
-[root@localhost ~] pip3 install shapely
|
|
|
-[root@localhost ~] pip3 install networkx
|
|
|
-[root@localhost ~] pip3 install jieba
|
|
|
+[root@localhost ~] pip3 install vg -i https://pypi.tuna.tsinghua.edu.cn/simple
|
|
|
+[root@localhost ~] pip3 install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple
|
|
|
+[root@localhost ~] pip3 install matplotlib -i https://pypi.tuna.tsinghua.edu.cn/simple
|
|
|
+[root@localhost ~] pip3 install shapely -i https://pypi.tuna.tsinghua.edu.cn/simple
|
|
|
+[root@localhost ~] pip3 install networkx -i https://pypi.tuna.tsinghua.edu.cn/simple
|
|
|
+[root@localhost ~] pip3 install jieba -i https://pypi.tuna.tsinghua.edu.cn/simple
|
|
|
[root@localhost ~] pip3 install short-text-sim -i http://dev.dp.sagacloud.cn:8082/repository/saga-pypi-group/simple --trusted-host dev.dp.sagacloud.cn
|
|
|
+
|
|
|
+安装公司的python私有库, 先安装git, 找到python3 的site-packages目录, cd进去
|
|
|
+[root@localhost ~] yum install -y git
|
|
|
+[root@localhost ~] find / -name site-packages
|
|
|
+[root@localhost ~] cd /usr/lib64/python3.6/site-packages (此处的路径可能会不同, 根据情况改变)
|
|
|
+[root@localhost site-packages] git clone http://39.106.8.246:3003/chenhaiyang/relations.git
|
|
|
+
|
|
|
+
|
|
|
```
|
|
|
### 安装过程遇到的问题
|
|
|
|