SlideShare une entreprise Scribd logo
1  sur  14
Télécharger pour lire hors ligne
F Ö R S TA S T E G E T I P Y T H O N
I N T R O D U K T I O N F O R F O R S K A R G R U P P E N D I G I TA L A M E T O D E R
mattiasostmar.net
H T T P : / / C O N D A . P Y D ATA . O R G /
M I N I C O N D A . H T M L
P O P U L Ä R T, A L LT- I - E T T O C H ” V E T E N S K A P L I G T ”
Välj Python 3.5 och 64 bit!
D I N N YA B Ä S TA VÄ N - T E R M I N A L E N !
D I N N YA B Ä S TA VÄ N - T E R M I N A L E N !
N AV I G E R A I T E R M I N A L E N
Du ser var du är i katalogstrukturen:

mosmba:~ mattiasostmar$
<datornamn>:<katalog> <användarnamn>
’~’ betyder användarens hemkatalog
’~’ (tilde) är alltså samma sak som:

/Users/mattiasostmar
N AV I G E R A I T E R M I N A L E N
’cd’ betyder Change Directory och används
för att byta katalog, dvs navigera.
Katalog, mapp och folder är samma sak.
För att navigera till mappen Documents:
$ cd ~/Documents
N AV I G E R A I T E R M I N A L E N
’pwd’ betyder Print Working Directory och 

används för att se vilken katalog man just
nu befinner sig i:
$ pwd
/Users/mattiasostmar
N AV I G E R A I T E R M I N A L E N
’..’ betyder en katalog bakåt i hierarkin,
exempelvis
$ pwd
/Users/mattiasostmar/Documents
$ cd ..
$ pwd
/Users/mattiasostmar
N AV I G E R A I T E R M I N A L E N
’ls -l’ är praktiskt för att se lite bättre
$ ls -l
total 8
drwx------ 4 mattiasostmar staff 136 30 Dec 17:30 Applications
drwx------+ 5 mattiasostmar staff 170 17 Feb 03:49 Desktop
drwx------+ 9 mattiasostmar staff 306 18 Feb 20:04 Documents
drwx------+ 24 mattiasostmar staff 816 19 Feb 10:44 Downloads
drwx------@ 15 mattiasostmar staff 510 18 Feb 20:04 Dropbox
drwx------@ 56 mattiasostmar staff 1904 15 Jan 14:15 Library
drwx------+ 3 mattiasostmar staff 102 29 Dec 19:41 Movies
drwx------+ 4 mattiasostmar staff 136 30 Dec 23:54 Music
drwx------+ 28 mattiasostmar staff 952 20 Feb 23:34 Pictures
drwxr-xr-x+ 5 mattiasostmar staff 170 29 Dec 19:41 Public
drwxr-xr-x 20 mattiasostmar staff 680 20 Feb 21:59 anaconda
-rw-r--r-- 1 mattiasostmar staff 0 20 Feb 23:57 en_fil.txt
-r--------@ 1 mattiasostmar staff 1692 15 Jan 13:30 mindalyzer.pem
drwxr-xr-x 12 mattiasostmar staff 408 3 Jan 11:26 miniconda3
L Ä R D I G M E R O M T E R M I N A L E N
Oavsett om du kör mac eller Windows
http://learncodethehardway.org/cli/book/
F Ö R AT T I N S TA L L E R A A N A C O N D A
$ cd ~/Downloads
$ bash Miniconda-latest-MacOSX-x86_64.sh
(eller där du laddade ner filen)
I P Y T H O N , J U P Y T E R O C H T E X T B L O B
$ conda install ipython
$ conda install jupyter
$ conda install -c https://conda.anaconda.org/sloria textblob
S TA R TA J U P Y T E R N O T E B O O K
Se till att du befinner dig i katalogen med
den notebook-fil du vill öppna, exempelvis
$ pwd
/Users/Downloads/python-intro
S TA R TA J U P Y T E R N O T E B O O K
Du kan även ställa dig i din hemkatalog
och klicka dig fram i Jupyter Notebook
$ cd ~
$ jupyter notebook

Contenu connexe

En vedette

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

En vedette (20)

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 

Första steget i python

  • 1. F Ö R S TA S T E G E T I P Y T H O N I N T R O D U K T I O N F O R F O R S K A R G R U P P E N D I G I TA L A M E T O D E R mattiasostmar.net
  • 2. H T T P : / / C O N D A . P Y D ATA . O R G / M I N I C O N D A . H T M L P O P U L Ä R T, A L LT- I - E T T O C H ” V E T E N S K A P L I G T ” Välj Python 3.5 och 64 bit!
  • 3. D I N N YA B Ä S TA VÄ N - T E R M I N A L E N !
  • 4. D I N N YA B Ä S TA VÄ N - T E R M I N A L E N !
  • 5. N AV I G E R A I T E R M I N A L E N Du ser var du är i katalogstrukturen:
 mosmba:~ mattiasostmar$ <datornamn>:<katalog> <användarnamn> ’~’ betyder användarens hemkatalog ’~’ (tilde) är alltså samma sak som:
 /Users/mattiasostmar
  • 6. N AV I G E R A I T E R M I N A L E N ’cd’ betyder Change Directory och används för att byta katalog, dvs navigera. Katalog, mapp och folder är samma sak. För att navigera till mappen Documents: $ cd ~/Documents
  • 7. N AV I G E R A I T E R M I N A L E N ’pwd’ betyder Print Working Directory och 
 används för att se vilken katalog man just nu befinner sig i: $ pwd /Users/mattiasostmar
  • 8. N AV I G E R A I T E R M I N A L E N ’..’ betyder en katalog bakåt i hierarkin, exempelvis $ pwd /Users/mattiasostmar/Documents $ cd .. $ pwd /Users/mattiasostmar
  • 9. N AV I G E R A I T E R M I N A L E N ’ls -l’ är praktiskt för att se lite bättre $ ls -l total 8 drwx------ 4 mattiasostmar staff 136 30 Dec 17:30 Applications drwx------+ 5 mattiasostmar staff 170 17 Feb 03:49 Desktop drwx------+ 9 mattiasostmar staff 306 18 Feb 20:04 Documents drwx------+ 24 mattiasostmar staff 816 19 Feb 10:44 Downloads drwx------@ 15 mattiasostmar staff 510 18 Feb 20:04 Dropbox drwx------@ 56 mattiasostmar staff 1904 15 Jan 14:15 Library drwx------+ 3 mattiasostmar staff 102 29 Dec 19:41 Movies drwx------+ 4 mattiasostmar staff 136 30 Dec 23:54 Music drwx------+ 28 mattiasostmar staff 952 20 Feb 23:34 Pictures drwxr-xr-x+ 5 mattiasostmar staff 170 29 Dec 19:41 Public drwxr-xr-x 20 mattiasostmar staff 680 20 Feb 21:59 anaconda -rw-r--r-- 1 mattiasostmar staff 0 20 Feb 23:57 en_fil.txt -r--------@ 1 mattiasostmar staff 1692 15 Jan 13:30 mindalyzer.pem drwxr-xr-x 12 mattiasostmar staff 408 3 Jan 11:26 miniconda3
  • 10. L Ä R D I G M E R O M T E R M I N A L E N Oavsett om du kör mac eller Windows http://learncodethehardway.org/cli/book/
  • 11. F Ö R AT T I N S TA L L E R A A N A C O N D A $ cd ~/Downloads $ bash Miniconda-latest-MacOSX-x86_64.sh (eller där du laddade ner filen)
  • 12. I P Y T H O N , J U P Y T E R O C H T E X T B L O B $ conda install ipython $ conda install jupyter $ conda install -c https://conda.anaconda.org/sloria textblob
  • 13. S TA R TA J U P Y T E R N O T E B O O K Se till att du befinner dig i katalogen med den notebook-fil du vill öppna, exempelvis $ pwd /Users/Downloads/python-intro
  • 14. S TA R TA J U P Y T E R N O T E B O O K Du kan även ställa dig i din hemkatalog och klicka dig fram i Jupyter Notebook $ cd ~ $ jupyter notebook