Linux系统centos7安装Python3和Postman

Python3的安装:
1.打开WEB浏览器访问 https://www.python.org/downloads/source/
2.选择适用于 Unix/Linux 的源码压缩包。
3.下载及解压压缩包 Python-3.x.x.tgz,3.x.x 为你下载的对应版本号。
4.确保已经安装以下依赖:
yum install gcc-c++
yum install pcre pcre-devel
yum install zlib zlib-devel
yum install openssl openssl–devel
yum -y install zlib*
关于在centos下安装python3.7.0以上版本时报错ModuleNotFoundError: No module named ‘_ctypes’的解决办法:
yum install libffi-devel -y
5.以 Python3.6.1 版本为例:
tar -zxvf Python-3.6.1.tgz
cd Python-3.6.1
./configure 或者 ./configure –prefix=/usr/local/python3
make && make install
6.创建软链接:ln -s /usr/local/python3/bin/python3 /usr/bin/python3
7.安装成功后,输入python3命令查看版本号
8.使用以下方法重新安装pip插件:
下载get-pip.py脚本:wget https://bootstrap.pypa.io/3.2/get-pip.py
运行脚本:python3 get-pip.py

Postman的安装:
1. 到官网下载:https://www.getpostman.com/apps,下载Linux版本64bit
2. 解压安装包到/usr/local/postman目录:tar zxvf postman.tar.gz -C /usr/local/postman
3. 建立软链接
sudo ln -s /usr/local/postman/Postman/Postman /usr/bin/postman
4. 创建postman应用程序启动器:
touch /usr/share/applications/postman.desktop
vim /usr/share/applications/postman.desktop
在/usr/share/applications/postman.desktop文件中添加如下内容:
[Desktop Entry]
Encoding=UTF-8
Name=Postman
Exec=/usr/bin/postman
Terminal=false
Type=Application
Icon=/usr/local/postman/Postman/app/resources/app/assets/icon.png
StartupNotify=true
Categories=Development;
5. 若Postman不能运行,可以进入解压目录/usr/local/postman,执行./Postman/Postman
若出现 error while loading shared libraries: libXss.so.1: cannot open shared object file: No such file or directory的错误
则执行命令:yum install libXScrnSaver

猜你喜欢

转载自blog.csdn.net/lwlhqyh/article/details/81505685
今日推荐