Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
岳巧源
/
data_server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
412d9cfb
authored
Aug 25, 2024
by
larosa
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
py3.8 install script
parent
4bf72ed0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
install.sh
install.sh
0 → 100644
View file @
412d9cfb
#!/bin/bash
# python3.8 安装脚本 仅作参考
# 如果 yum源有问题 ,可以使用华为yum源 下面不是必做的 wget 可以换为 curl
#cp -a /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
#wget -O /etc/yum.repos.d/CentOS-Base.repo https://repo.huaweicloud.com/repository/conf/CentOS-7-anon.repo
#yum clean all
#yum makecache
# 注意切换到正确的文件路径下
yum install
-y
gcc openssl-devel bzip2-devel libffi-devel wget
wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz
tar
-zxvf
Python-3.8.0.tgz
cd
Python-3.8.0
mkdir
-p
/usr/local/python3.8
./configure
--enable-optimizations
--prefix
=
/usr/local/python3.8
make
#注意 不要使用 make install 否则会覆盖已存在的python 版本,导致错误
make altinstall
ln
-s
/usr/local/python3.8/bin/python3.8 /usr/bin/python3.8
ln
-s
/usr/local/python3.8/bin/pip3.8 /usr/bin/pip3.8
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment