Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
PYTHON
let me talk a story!
HPDS_wy_dienyang
About python
!
Design	 principle:elegant,explicit,simple	 
Motto:	 There	 is	 only	 one	 way	 to	 do	 it.
HPDS_wy_dienyang
About python
!
Design	 principle:elegant,explicit,simple	 
Motto:	 There	 is	 only	 one	 way	 to	 do	 it.
HPDS_wy_dienyang
why we choose python?
python	 is	 maintainable	 
python	 is	 flexible	 
python	 is	 easy	 and	 learn	 and	 use
HPDS_wy_die...
python 2 v.s python3
python	 2.7	 is	 legacy	 
python	 3	 is	 new	 generation
HPDS_wy_dienyang
python how to start?
	 python	 IDE	 
	 terminal
HPDS_wy_dienyang
python IDE
	 integrated	 development	 environment	 
	 debug,edit,demo	 

	 	 	 	 	 	 	 	 	 	 	 	 	 	 only	 single	 interfa...
Let’s do it
HPDS_wy_dienyang
ubuntu
mac
Let’s do it
HPDS_wy_dienyang
open it !
print(‘hello world’)
a=10
if a > 5:
print(‘a > 5’)
else:
print(‘a < 5’)
then do tha...
Let’s do it
HPDS_wy_dienyang
print(‘hello world’)
a=10
if a > 5:
print(‘a > 5’)
else:
print(‘a < 5’)
save xxx.py
python’s virtual environment
virtualenv
HPDS_wy_dienyang
the name is
python’s virtual environment
virtualenv
HPDS_wy_dienyang
the name is
before we talk about virtaulenv

we talk pip
pip
python’s virtual environment
HPDS_wy_dienyang
pip managing python packages
python’s virtual environment
HPDS_wy_dienyang
pip managing python packages
so cool
python’s virtual environment
virtualenvthe name is
HPDS_wy_dienyang
python’s virtual environment
virtualenvthe name is
HPDS_wy_dienyang
let’s do it
HPDS_wy_dienyang
sudo easy_install virtualenv
sudo apt-get install python-virtualenv
mac
ubuntu
let’s do it
HPDS_wy_dienyang
virtualenv python_3 --python=python3
!
python_3
cd python_3 enter python_folder
source bin/ac...
python’s virtual environment
HPDS_wy_dienyang
You have own python environment
nice!
cool
terminal run xxx.py!
HPDS_wy_dienyang
when you enter your virtual environment
python xxx.py
I’am confused!
HPDS_wy_dienyang
python ide
terminal
if you want to test
if you want to run
ipython
HPDS_wy_dienyang
when you enter your virtual environment
pip install ipython
ipython
ipython
HPDS_wy_dienyang
when you enter your virtual environment
pip install ipython
ipython
cool
dienyang is handsome
wow
python key word
HPDS_wy_dienyang
virtualevn
ide
ipython
pip
the end
Upcoming SlideShare
Loading in …5
×

Python簡介和多版本虛擬環境架設

2,240 views

Published on

簡介python 和 用virtualevn進行多版本環境架設

Published in: Software
  • Be the first to comment

Python簡介和多版本虛擬環境架設

  1. 1. PYTHON let me talk a story! HPDS_wy_dienyang
  2. 2. About python ! Design principle:elegant,explicit,simple Motto: There is only one way to do it. HPDS_wy_dienyang
  3. 3. About python ! Design principle:elegant,explicit,simple Motto: There is only one way to do it. HPDS_wy_dienyang
  4. 4. why we choose python? python is maintainable python is flexible python is easy and learn and use HPDS_wy_dienyang
  5. 5. python 2 v.s python3 python 2.7 is legacy python 3 is new generation HPDS_wy_dienyang
  6. 6. python how to start? python IDE terminal HPDS_wy_dienyang
  7. 7. python IDE integrated development environment debug,edit,demo 
 only single interface HPDS_wy_dienyang
  8. 8. Let’s do it HPDS_wy_dienyang ubuntu mac
  9. 9. Let’s do it HPDS_wy_dienyang open it ! print(‘hello world’) a=10 if a > 5: print(‘a > 5’) else: print(‘a < 5’) then do that and
  10. 10. Let’s do it HPDS_wy_dienyang print(‘hello world’) a=10 if a > 5: print(‘a > 5’) else: print(‘a < 5’) save xxx.py
  11. 11. python’s virtual environment virtualenv HPDS_wy_dienyang the name is
  12. 12. python’s virtual environment virtualenv HPDS_wy_dienyang the name is before we talk about virtaulenv
 we talk pip pip
  13. 13. python’s virtual environment HPDS_wy_dienyang pip managing python packages
  14. 14. python’s virtual environment HPDS_wy_dienyang pip managing python packages so cool
  15. 15. python’s virtual environment virtualenvthe name is HPDS_wy_dienyang
  16. 16. python’s virtual environment virtualenvthe name is HPDS_wy_dienyang
  17. 17. let’s do it HPDS_wy_dienyang sudo easy_install virtualenv sudo apt-get install python-virtualenv mac ubuntu
  18. 18. let’s do it HPDS_wy_dienyang virtualenv python_3 --python=python3 ! python_3 cd python_3 enter python_folder source bin/activate activate script deactivate exit the environment create two virtual environment one is python2 , the other is python3
  19. 19. python’s virtual environment HPDS_wy_dienyang You have own python environment nice! cool
  20. 20. terminal run xxx.py! HPDS_wy_dienyang when you enter your virtual environment python xxx.py
  21. 21. I’am confused! HPDS_wy_dienyang python ide terminal if you want to test if you want to run
  22. 22. ipython HPDS_wy_dienyang when you enter your virtual environment pip install ipython ipython
  23. 23. ipython HPDS_wy_dienyang when you enter your virtual environment pip install ipython ipython cool dienyang is handsome wow
  24. 24. python key word HPDS_wy_dienyang virtualevn ide ipython pip the end

×