Skip to content

Commit e75288d

Browse files
committed
update install_Python
1 parent d2fa8d6 commit e75288d

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

install_Python/installPython.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66

77
import sys
88

9+
10+
11+
def installipython():
12+
ip = os.system('pip install ipython')
13+
if not ip:
14+
print 'ipython安装成功'
15+
else:
16+
print '请手动安装ipython(pip install ipython)'
917
def updateyum():
1018
yu = os.system('\cp -fr ./yum /usr/bin/')
1119
if yu == 0:
@@ -20,6 +28,8 @@ def installpip():
2028
print 'pip 安装成功'
2129
if os.system('pip install --upgrade pip') == 0:
2230
print 'pip更新成功'
31+
32+
2333
os.chdir('..')
2434

2535
def changedir():
@@ -49,13 +59,13 @@ def main():
4959
#setuptools = os.system('wget https://bootstrap.pypa.io/ez_setup.py -O - | python')
5060
#if setuptools == 0:
5161
# print 'setuptools 安装成功'
52-
print os.getcwd()
53-
os.system('unzip setuptools-30.2.0.zip')
62+
63+
installPython()
64+
changedir()
65+
os.system('unzip setuptools-30.2.0.zip')
5466
os.chdir('setuptools-30.2.0')
5567
os.system('python setup.py install')
5668
os.chdir('..')
57-
installPython()
58-
changedir()
5969
installpip()
6070
updateyum()
6171

0 commit comments

Comments
 (0)