centos安装python3 及配置pip
https://blog.csdn.net/slwhy/article/details/79930662
Django+CentOs7+uwsgi+nginx部署网站记录
http://www.xuyukun.com/python/django/djangocentos7uwsginginx%e9%83%a8%e7%bd%b2%e7%bd
%91%e7%ab%99%e8%ae%b0%e5%bd%95/
在安装python3.7的时候提示了报错 ModuleNotFoundError: No module named '_ctypes' 。发下没有安装pip3 然后收到安装,各种报错。
可以直接安装
yum -y install libffi-devel
yum install gcc
yum install openssl-devel -y
yum install zlib-devel -y
./configure --with-ssl -prefix=/usr/local/python3 编译带上 ssl 否则pip报错。
然后在回到 python3.7的安装目录,重新make make install 会自动安装上pip 和 setuptools
centos 修改pip 源
[root@localhost ~]# cd ~ [root@localhost ~]# mkdir .pip [root@localhost ~]# cd .pip [root@localhost .pip]# vim pip.conf
[global] index-url=https://pypi.tuna.tsinghua.edu.cn/simple trusted-host = pypi.tuna.tsinghua.edu.cn
centos 修改yum源
(1)、备份,将 CentOS-Base.repo 为CentOS-Base.repo.backup
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
(2)、下载新的 http://mirrors.aliyun.com/repo/Centos-7.repo,并命名为CentOS-Base.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 或者 curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
(3)、清除缓存
yum clean all # 清除系统所有的yum缓存 yum makecache # 生成yum缓存 yum update
epel源 安装和配置 (1)、查看可用的epel源 yum list | grep epel-release epel-release.noarch 7-11 extras (2)、安装 epel yum install -y epel-release (3)、配置阿里镜像提供的epel源 wget -O /etc/yum.repos.d/epel-7.repo http://mirrors.aliyun.com/repo/epel-7.repo 4、清除缓存 yum clean all # 清除系统所有的yum缓存 yum makecache # 生成yum缓存 yum update