作者:沉白 | 来源:互联网 | 2023-07-01 07:57
安装必要的库,针对centos是minimal安装yuminstallzlib-develbzip2-developenssl-develncurses-develsqlite-develreadline-develtk-develgc
安装必要的库,针对centos 是minimal 安装
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make libffi-devel epel-release vim -y
wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz
tar -zxvf Python-3.7.0.tgz
cd Python-3.7.0
./configure prefix=/usr/local/python3
make && make install
安装一些常用的python 库
pip install --pre scapy[basic]
pip install python-cryptography
pip install pyx
pip install cryptography
pip install vpython
pip install matplotlib
软链接
ln -s /usr/local/python3/bin/python3.7 /usr/bin/python
ln -s /usr/local/python3/bin/pip3.7 /usr/bin/pip
ln -s /usr/local/python3/bin/scapy /usr/bin/scapy
运行vim 时遇到问题解决的办法(vim 有些代码是使用python2):
vi /usr/bin/yum
把 #! /usr/bin/python 修改为 #! /usr/bin/python2
vi /usr/libexec/urlgrabber-ext-down
把 #! /usr/bin/python 修改为 #! /usr/bin/python2