SlideShare a Scribd company logo

Python Versions and Dependencies Made Easy

Presentation about Python versions and dependencies management

1 of 97
Download to read offline
Sebastian Witowski
Python Versions and
Dependencies Made Easy
Sebastian Witowski
Python consultant, freelancer, and trainer
@SebaWitowski switowski.com
Problem with (Python) projects
@SebaWitowski switowski.com
Problem with (Python) projects
Stuck in the 90s
Over-engineered
@SebaWitowski switowski.com
Problem with (Python) projects
Over-engineered
• Too many shiny new tools from
HackerNews

• Those tools gets abandoned

• You spend too much time
replacing old tools with new ones
Stuck in the 90s
@SebaWitowski switowski.com
Problem with (Python) projects
Over-engineered
• Too many shiny new tools from
HackerNews

• Those tools gets abandoned

• You spend too much time
replacing old tools with new ones
Stuck in the 90s
• Everything managed with Bash
scripts

• You have to maintain Bash
scripts or some other scripts
(as a Python developer)
@SebaWitowski switowski.com

Recommended

Introduction to docker and docker compose
Introduction to docker and docker composeIntroduction to docker and docker compose
Introduction to docker and docker composeLalatendu Mohanty
 
오픈소스 개발을 위한 Git 사용법 실습
오픈소스 개발을 위한 Git 사용법 실습오픈소스 개발을 위한 Git 사용법 실습
오픈소스 개발을 위한 Git 사용법 실습BJ Jang
 
Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners HubSpot
 
Introduction to Git and Github
Introduction to Git and Github Introduction to Git and Github
Introduction to Git and Github Max Claus Nunes
 

More Related Content

What's hot

[오픈소스컨설팅]Session 4. dev ops 구성 사례와 전망
[오픈소스컨설팅]Session 4. dev ops 구성 사례와 전망[오픈소스컨설팅]Session 4. dev ops 구성 사례와 전망
[오픈소스컨설팅]Session 4. dev ops 구성 사례와 전망Open Source Consulting
 
DevOps와 자동화
DevOps와 자동화DevOps와 자동화
DevOps와 자동화DONGSU KIM
 
Git 입문자를 위한 가이드
Git 입문자를 위한 가이드Git 입문자를 위한 가이드
Git 입문자를 위한 가이드chandler0201
 
How to Build a Custom Plugin in Rundeck
How to Build a Custom Plugin in RundeckHow to Build a Custom Plugin in Rundeck
How to Build a Custom Plugin in RundeckRundeck
 
버전관리를 들어본적 없는 사람들을 위한 DVCS - Git
버전관리를 들어본적 없는 사람들을 위한 DVCS - Git버전관리를 들어본적 없는 사람들을 위한 DVCS - Git
버전관리를 들어본적 없는 사람들을 위한 DVCS - Git민태 김
 
Git이란 (Git 소개 및 기초 이론)
Git이란 (Git 소개 및 기초 이론)Git이란 (Git 소개 및 기초 이론)
Git이란 (Git 소개 및 기초 이론)승용 윤
 
Apache Knox setup and hive and hdfs Access using KNOX
Apache Knox setup and hive and hdfs Access using KNOXApache Knox setup and hive and hdfs Access using KNOX
Apache Knox setup and hive and hdfs Access using KNOXAbhishek Mallick
 
Introduction to Git Commands and Concepts
Introduction to Git Commands and ConceptsIntroduction to Git Commands and Concepts
Introduction to Git Commands and ConceptsCarl Brown
 
Learning git
Learning gitLearning git
Learning gitSid Anand
 
Git branching strategies
Git branching strategiesGit branching strategies
Git branching strategiesjstack
 
Stateful set in kubernetes implementation & usecases
Stateful set in kubernetes implementation & usecases Stateful set in kubernetes implementation & usecases
Stateful set in kubernetes implementation & usecases Krishna-Kumar
 
초보자를 위한 Git & GitHub
초보자를 위한 Git & GitHub초보자를 위한 Git & GitHub
초보자를 위한 Git & GitHubYurim Jin
 

What's hot (20)

Dockerfile
Dockerfile Dockerfile
Dockerfile
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub
 
GIT In Detail
GIT In DetailGIT In Detail
GIT In Detail
 
[오픈소스컨설팅]Session 4. dev ops 구성 사례와 전망
[오픈소스컨설팅]Session 4. dev ops 구성 사례와 전망[오픈소스컨설팅]Session 4. dev ops 구성 사례와 전망
[오픈소스컨설팅]Session 4. dev ops 구성 사례와 전망
 
Git for beginners
Git for beginnersGit for beginners
Git for beginners
 
Git basic
Git basicGit basic
Git basic
 
DevOps와 자동화
DevOps와 자동화DevOps와 자동화
DevOps와 자동화
 
Git flow
Git flowGit flow
Git flow
 
Introduction to git & GitHub
Introduction to git & GitHubIntroduction to git & GitHub
Introduction to git & GitHub
 
Git 입문자를 위한 가이드
Git 입문자를 위한 가이드Git 입문자를 위한 가이드
Git 입문자를 위한 가이드
 
Introduction to Git and GitHub
Introduction to Git and GitHubIntroduction to Git and GitHub
Introduction to Git and GitHub
 
How to Build a Custom Plugin in Rundeck
How to Build a Custom Plugin in RundeckHow to Build a Custom Plugin in Rundeck
How to Build a Custom Plugin in Rundeck
 
버전관리를 들어본적 없는 사람들을 위한 DVCS - Git
버전관리를 들어본적 없는 사람들을 위한 DVCS - Git버전관리를 들어본적 없는 사람들을 위한 DVCS - Git
버전관리를 들어본적 없는 사람들을 위한 DVCS - Git
 
Git이란 (Git 소개 및 기초 이론)
Git이란 (Git 소개 및 기초 이론)Git이란 (Git 소개 및 기초 이론)
Git이란 (Git 소개 및 기초 이론)
 
Apache Knox setup and hive and hdfs Access using KNOX
Apache Knox setup and hive and hdfs Access using KNOXApache Knox setup and hive and hdfs Access using KNOX
Apache Knox setup and hive and hdfs Access using KNOX
 
Introduction to Git Commands and Concepts
Introduction to Git Commands and ConceptsIntroduction to Git Commands and Concepts
Introduction to Git Commands and Concepts
 
Learning git
Learning gitLearning git
Learning git
 
Git branching strategies
Git branching strategiesGit branching strategies
Git branching strategies
 
Stateful set in kubernetes implementation & usecases
Stateful set in kubernetes implementation & usecases Stateful set in kubernetes implementation & usecases
Stateful set in kubernetes implementation & usecases
 
초보자를 위한 Git & GitHub
초보자를 위한 Git & GitHub초보자를 위한 Git & GitHub
초보자를 위한 Git & GitHub
 

Similar to Python Versions and Dependencies Made Easy

5 minute intro to virtualenv
5 minute intro to virtualenv5 minute intro to virtualenv
5 minute intro to virtualenvamenasse
 
Python virtualenv & pip in 90 minutes
Python virtualenv & pip in 90 minutesPython virtualenv & pip in 90 minutes
Python virtualenv & pip in 90 minutesLarry Cai
 
Run Python on windows
Run Python on windowsRun Python on windows
Run Python on windowsSitthykun LY
 
Arbeiten mit distribute, pip und virtualenv
Arbeiten mit distribute, pip und virtualenvArbeiten mit distribute, pip und virtualenv
Arbeiten mit distribute, pip und virtualenvMarkus Zapke-Gründemann
 
Pip + virtualenv
Pip + virtualenvPip + virtualenv
Pip + virtualenvDaryl Yu
 
A.I. Exercise.
A.I. Exercise.A.I. Exercise.
A.I. Exercise.Mario Cho
 
AWS EC2 Ubuntu Instance - Step-by-Step Deployment Guide
AWS EC2 Ubuntu Instance - Step-by-Step Deployment GuideAWS EC2 Ubuntu Instance - Step-by-Step Deployment Guide
AWS EC2 Ubuntu Instance - Step-by-Step Deployment GuideRapidValue
 
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
Symfony Live NYC 2014 -  Rock Solid Deployment of Symfony AppsSymfony Live NYC 2014 -  Rock Solid Deployment of Symfony Apps
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony AppsPablo Godel
 
Python Dependency Management - PyconDE 2018
Python Dependency Management - PyconDE 2018Python Dependency Management - PyconDE 2018
Python Dependency Management - PyconDE 2018Patrick Muehlbauer
 
Django Dev Environment Howto
Django Dev Environment HowtoDjango Dev Environment Howto
Django Dev Environment HowtoTzu-ping Chung
 
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsSymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsPablo Godel
 
Packaging in Python? Don't Roll the Dice.
Packaging in Python? Don't Roll the Dice.Packaging in Python? Don't Roll the Dice.
Packaging in Python? Don't Roll the Dice.ldaws
 
Australian Bioinformatics Conference (ABiC) 2014 Talk - Doing bioinformatics ...
Australian Bioinformatics Conference (ABiC) 2014 Talk - Doing bioinformatics ...Australian Bioinformatics Conference (ABiC) 2014 Talk - Doing bioinformatics ...
Australian Bioinformatics Conference (ABiC) 2014 Talk - Doing bioinformatics ...The University of Queensland
 
20120524 english lt2_pythontoolsfortesting
20120524 english lt2_pythontoolsfortesting20120524 english lt2_pythontoolsfortesting
20120524 english lt2_pythontoolsfortestingKazuhiro Oinuma
 
The Scientific Filesystem
The Scientific FilesystemThe Scientific Filesystem
The Scientific FilesystemVanessa S
 

Similar to Python Versions and Dependencies Made Easy (20)

5 minute intro to virtualenv
5 minute intro to virtualenv5 minute intro to virtualenv
5 minute intro to virtualenv
 
Python environments
Python environmentsPython environments
Python environments
 
Python virtualenv & pip in 90 minutes
Python virtualenv & pip in 90 minutesPython virtualenv & pip in 90 minutes
Python virtualenv & pip in 90 minutes
 
Run Python on windows
Run Python on windowsRun Python on windows
Run Python on windows
 
Virtualenv
VirtualenvVirtualenv
Virtualenv
 
Arbeiten mit distribute, pip und virtualenv
Arbeiten mit distribute, pip und virtualenvArbeiten mit distribute, pip und virtualenv
Arbeiten mit distribute, pip und virtualenv
 
Python+gradle
Python+gradlePython+gradle
Python+gradle
 
Pip + virtualenv
Pip + virtualenvPip + virtualenv
Pip + virtualenv
 
A.I. Exercise.
A.I. Exercise.A.I. Exercise.
A.I. Exercise.
 
AWS EC2 Ubuntu Instance - Step-by-Step Deployment Guide
AWS EC2 Ubuntu Instance - Step-by-Step Deployment GuideAWS EC2 Ubuntu Instance - Step-by-Step Deployment Guide
AWS EC2 Ubuntu Instance - Step-by-Step Deployment Guide
 
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
Symfony Live NYC 2014 -  Rock Solid Deployment of Symfony AppsSymfony Live NYC 2014 -  Rock Solid Deployment of Symfony Apps
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
 
Python Dependency Management - PyconDE 2018
Python Dependency Management - PyconDE 2018Python Dependency Management - PyconDE 2018
Python Dependency Management - PyconDE 2018
 
Introduction to robot framework
Introduction to robot frameworkIntroduction to robot framework
Introduction to robot framework
 
Django Dev Environment Howto
Django Dev Environment HowtoDjango Dev Environment Howto
Django Dev Environment Howto
 
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsSymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
 
Packaging in Python? Don't Roll the Dice.
Packaging in Python? Don't Roll the Dice.Packaging in Python? Don't Roll the Dice.
Packaging in Python? Don't Roll the Dice.
 
Australian Bioinformatics Conference (ABiC) 2014 Talk - Doing bioinformatics ...
Australian Bioinformatics Conference (ABiC) 2014 Talk - Doing bioinformatics ...Australian Bioinformatics Conference (ABiC) 2014 Talk - Doing bioinformatics ...
Australian Bioinformatics Conference (ABiC) 2014 Talk - Doing bioinformatics ...
 
An introduction to SVN
An introduction to SVNAn introduction to SVN
An introduction to SVN
 
20120524 english lt2_pythontoolsfortesting
20120524 english lt2_pythontoolsfortesting20120524 english lt2_pythontoolsfortesting
20120524 english lt2_pythontoolsfortesting
 
The Scientific Filesystem
The Scientific FilesystemThe Scientific Filesystem
The Scientific Filesystem
 

More from Sebastian Witowski

5 Things I Wish I Knew About Gitlab CI
5 Things I Wish I Knew About Gitlab CI5 Things I Wish I Knew About Gitlab CI
5 Things I Wish I Knew About Gitlab CISebastian Witowski
 
Productivity tips for developers
Productivity tips for developersProductivity tips for developers
Productivity tips for developersSebastian Witowski
 
Wait, IPython can do that?! (30 minutes)
Wait, IPython can do that?! (30 minutes)Wait, IPython can do that?! (30 minutes)
Wait, IPython can do that?! (30 minutes)Sebastian Witowski
 
It's 2019 & I'm still using Python 2! Should I be worried?
It's 2019 & I'm still using Python 2! Should I be worried?It's 2019 & I'm still using Python 2! Should I be worried?
It's 2019 & I'm still using Python 2! Should I be worried?Sebastian Witowski
 

More from Sebastian Witowski (7)

5 Things I Wish I Knew About Gitlab CI
5 Things I Wish I Knew About Gitlab CI5 Things I Wish I Knew About Gitlab CI
5 Things I Wish I Knew About Gitlab CI
 
Optimizing Your CI Pipelines
Optimizing Your CI PipelinesOptimizing Your CI Pipelines
Optimizing Your CI Pipelines
 
Writing Faster Python 3
Writing Faster Python 3Writing Faster Python 3
Writing Faster Python 3
 
Productivity tips for developers
Productivity tips for developersProductivity tips for developers
Productivity tips for developers
 
Wait, IPython can do that?! (30 minutes)
Wait, IPython can do that?! (30 minutes)Wait, IPython can do that?! (30 minutes)
Wait, IPython can do that?! (30 minutes)
 
It's 2019 & I'm still using Python 2! Should I be worried?
It's 2019 & I'm still using Python 2! Should I be worried?It's 2019 & I'm still using Python 2! Should I be worried?
It's 2019 & I'm still using Python 2! Should I be worried?
 
Wait, IPython can do that?
Wait, IPython can do that?Wait, IPython can do that?
Wait, IPython can do that?
 

Recently uploaded

DBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and FlinkDBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and FlinkTimothy Spann
 
Machine Learning Basics for Dummies (no math!)
Machine Learning Basics for Dummies (no math!)Machine Learning Basics for Dummies (no math!)
Machine Learning Basics for Dummies (no math!)Dmitry Zinoviev
 
Welcome to AltTask - the nexus where innovation converges with empowerment!
Welcome to AltTask - the nexus where innovation converges with empowerment!Welcome to AltTask - the nexus where innovation converges with empowerment!
Welcome to AltTask - the nexus where innovation converges with empowerment!alttaskcom
 
Automation for Bonterra Impact Management (fka Apricot)
Automation for Bonterra Impact Management (fka Apricot)Automation for Bonterra Impact Management (fka Apricot)
Automation for Bonterra Impact Management (fka Apricot)Jeffrey Haguewood
 
Role of DevOps in SaaS product Development.pdf.pptx
Role of DevOps in SaaS product Development.pdf.pptxRole of DevOps in SaaS product Development.pdf.pptx
Role of DevOps in SaaS product Development.pdf.pptxMindInventory
 
killing camp week 6 problem - maximal matrix.pdf
killing camp week 6 problem - maximal matrix.pdfkilling camp week 6 problem - maximal matrix.pdf
killing camp week 6 problem - maximal matrix.pdfssuser82c38d
 
SPM 2024 – Overview of and benefits of AI in Product Management
SPM 2024 – Overview of and benefits of AI in Product ManagementSPM 2024 – Overview of and benefits of AI in Product Management
SPM 2024 – Overview of and benefits of AI in Product ManagementISPMAIndia
 
The Age of AI: Elevating Experiences & Delivering Customer Value!
The Age of AI: Elevating Experiences & Delivering Customer Value!The Age of AI: Elevating Experiences & Delivering Customer Value!
The Age of AI: Elevating Experiences & Delivering Customer Value!ISPMAIndia
 
Implementing Docker Containers with Windows Server 2019
Implementing Docker Containers with Windows Server 2019Implementing Docker Containers with Windows Server 2019
Implementing Docker Containers with Windows Server 2019VICTOR MAESTRE RAMIREZ
 
OpenChain AI Study Group - North America and Europe - 2024-02-20
OpenChain AI Study Group - North America and Europe - 2024-02-20OpenChain AI Study Group - North America and Europe - 2024-02-20
OpenChain AI Study Group - North America and Europe - 2024-02-20Shane Coughlan
 
The Top Outages of 2023: Analyses and Takeaways
The Top Outages of 2023: Analyses and TakeawaysThe Top Outages of 2023: Analyses and Takeaways
The Top Outages of 2023: Analyses and TakeawaysThousandEyes
 
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이ssuser82c38d
 
killingcamp longest common subsequence.pdf
killingcamp longest common subsequence.pdfkillingcamp longest common subsequence.pdf
killingcamp longest common subsequence.pdfssuser82c38d
 
AI Product Management by Abhijit Bendigiri
AI Product Management by Abhijit BendigiriAI Product Management by Abhijit Bendigiri
AI Product Management by Abhijit BendigiriISPMAIndia
 
The Game-Changer_ How Software Development Outsource Can Catapult Your Growth...
The Game-Changer_ How Software Development Outsource Can Catapult Your Growth...The Game-Changer_ How Software Development Outsource Can Catapult Your Growth...
The Game-Changer_ How Software Development Outsource Can Catapult Your Growth...emili denli
 
"Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A...
"Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A..."Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A...
"Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A...ISPMAIndia
 
P1 Inspection Types in Municity 5 Smartsheet
P1 Inspection Types in Municity 5 SmartsheetP1 Inspection Types in Municity 5 Smartsheet
P1 Inspection Types in Municity 5 SmartsheetMatthewTHawley
 
"Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ...
"Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ..."Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ...
"Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ...ISPMAIndia
 
Agile & Scrum, Certified Scrum Master! Crash Course
Agile & Scrum,  Certified Scrum Master! Crash CourseAgile & Scrum,  Certified Scrum Master! Crash Course
Agile & Scrum, Certified Scrum Master! Crash CourseRohan Chandane
 

Recently uploaded (20)

DBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and FlinkDBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and Flink
 
Machine Learning Basics for Dummies (no math!)
Machine Learning Basics for Dummies (no math!)Machine Learning Basics for Dummies (no math!)
Machine Learning Basics for Dummies (no math!)
 
Welcome to AltTask - the nexus where innovation converges with empowerment!
Welcome to AltTask - the nexus where innovation converges with empowerment!Welcome to AltTask - the nexus where innovation converges with empowerment!
Welcome to AltTask - the nexus where innovation converges with empowerment!
 
Automation for Bonterra Impact Management (fka Apricot)
Automation for Bonterra Impact Management (fka Apricot)Automation for Bonterra Impact Management (fka Apricot)
Automation for Bonterra Impact Management (fka Apricot)
 
eLearning Content Development Company Code and Pixels.pdf
eLearning Content Development Company Code and Pixels.pdfeLearning Content Development Company Code and Pixels.pdf
eLearning Content Development Company Code and Pixels.pdf
 
Role of DevOps in SaaS product Development.pdf.pptx
Role of DevOps in SaaS product Development.pdf.pptxRole of DevOps in SaaS product Development.pdf.pptx
Role of DevOps in SaaS product Development.pdf.pptx
 
killing camp week 6 problem - maximal matrix.pdf
killing camp week 6 problem - maximal matrix.pdfkilling camp week 6 problem - maximal matrix.pdf
killing camp week 6 problem - maximal matrix.pdf
 
SPM 2024 – Overview of and benefits of AI in Product Management
SPM 2024 – Overview of and benefits of AI in Product ManagementSPM 2024 – Overview of and benefits of AI in Product Management
SPM 2024 – Overview of and benefits of AI in Product Management
 
The Age of AI: Elevating Experiences & Delivering Customer Value!
The Age of AI: Elevating Experiences & Delivering Customer Value!The Age of AI: Elevating Experiences & Delivering Customer Value!
The Age of AI: Elevating Experiences & Delivering Customer Value!
 
Implementing Docker Containers with Windows Server 2019
Implementing Docker Containers with Windows Server 2019Implementing Docker Containers with Windows Server 2019
Implementing Docker Containers with Windows Server 2019
 
OpenChain AI Study Group - North America and Europe - 2024-02-20
OpenChain AI Study Group - North America and Europe - 2024-02-20OpenChain AI Study Group - North America and Europe - 2024-02-20
OpenChain AI Study Group - North America and Europe - 2024-02-20
 
The Top Outages of 2023: Analyses and Takeaways
The Top Outages of 2023: Analyses and TakeawaysThe Top Outages of 2023: Analyses and Takeaways
The Top Outages of 2023: Analyses and Takeaways
 
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이
 
killingcamp longest common subsequence.pdf
killingcamp longest common subsequence.pdfkillingcamp longest common subsequence.pdf
killingcamp longest common subsequence.pdf
 
AI Product Management by Abhijit Bendigiri
AI Product Management by Abhijit BendigiriAI Product Management by Abhijit Bendigiri
AI Product Management by Abhijit Bendigiri
 
The Game-Changer_ How Software Development Outsource Can Catapult Your Growth...
The Game-Changer_ How Software Development Outsource Can Catapult Your Growth...The Game-Changer_ How Software Development Outsource Can Catapult Your Growth...
The Game-Changer_ How Software Development Outsource Can Catapult Your Growth...
 
"Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A...
"Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A..."Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A...
"Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A...
 
P1 Inspection Types in Municity 5 Smartsheet
P1 Inspection Types in Municity 5 SmartsheetP1 Inspection Types in Municity 5 Smartsheet
P1 Inspection Types in Municity 5 Smartsheet
 
"Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ...
"Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ..."Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ...
"Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ...
 
Agile & Scrum, Certified Scrum Master! Crash Course
Agile & Scrum,  Certified Scrum Master! Crash CourseAgile & Scrum,  Certified Scrum Master! Crash Course
Agile & Scrum, Certified Scrum Master! Crash Course
 

Python Versions and Dependencies Made Easy

  • 1. Sebastian Witowski Python Versions and Dependencies Made Easy
  • 2. Sebastian Witowski Python consultant, freelancer, and trainer @SebaWitowski switowski.com
  • 3. Problem with (Python) projects @SebaWitowski switowski.com
  • 4. Problem with (Python) projects Stuck in the 90s Over-engineered @SebaWitowski switowski.com
  • 5. Problem with (Python) projects Over-engineered • Too many shiny new tools from HackerNews • Those tools gets abandoned • You spend too much time replacing old tools with new ones Stuck in the 90s @SebaWitowski switowski.com
  • 6. Problem with (Python) projects Over-engineered • Too many shiny new tools from HackerNews • Those tools gets abandoned • You spend too much time replacing old tools with new ones Stuck in the 90s • Everything managed with Bash scripts • You have to maintain Bash scripts or some other scripts (as a Python developer) @SebaWitowski switowski.com
  • 7. How about a middle ground? @SebaWitowski switowski.com
  • 8. What will we talk about? • pyenv - installing different Python versions on your computer @SebaWitowski switowski.com
  • 9. What will we talk about? • pyenv - installing different Python versions on your computer • venv - isolating dependencies of your projects @SebaWitowski switowski.com
  • 10. What will we talk about? • pyenv - installing different Python versions on your computer • venv - isolating dependencies of your projects • pipx - installing global packages @SebaWitowski switowski.com
  • 11. What will we talk about? • pyenv - installing different Python versions on your computer • venv - isolating dependencies of your projects • pipx - installing global packages • pip-tools - dependency pinning @SebaWitowski switowski.com
  • 14. • Python version preinstalled on your OS is called “system Python” System Python @SebaWitowski switowski.com
  • 15. • Python version preinstalled on your OS is called “system Python” • Please, don’t use it System Python @SebaWitowski switowski.com
  • 16. • Python version preinstalled on your OS is called “system Python” • Please, don’t use it • And don’t update it (you might break your OS)! System Python @SebaWitowski switowski.com
  • 17. How to install a new Python version? @SebaWitowski switowski.com
  • 18. • Use an installer from python.org How to install a new Python version? @SebaWitowski switowski.com
  • 19. • Use an installer from python.org • Use your package manager How to install a new Python version? @SebaWitowski switowski.com
  • 20. • Use an installer from python.org • Use your package manager • Compile it from the source files How to install a new Python version? @SebaWitowski switowski.com
  • 21. Or you can use pyenv! https://github.com/pyenv/pyenv @SebaWitowski switowski.com
  • 22. Or pyenv-win for Windows https://github.com/pyenv-win/pyenv-win @SebaWitowski switowski.com
  • 25. Using pyenv 1. Find Python version to install $ pyenv install --list Available versions: 2.1.3 2.2.3 2.3.7 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4 ... ... 3.9.0 3.9-dev 3.10-dev activepython-2.7.14 activepython-3.5.4 activepython-3.6.0 anaconda-1.4.0 anaconda-1.5.0 anaconda-1.5.1 anaconda-1.6.0 anaconda-1.6.1 anaconda-1.7.0 anaconda-1.8.0 anaconda-1.9.0 ... ... miniconda3-4.7.12 pypy-c-jit-latest pypy-c-nojit-latest pypy-dev pypy-stm-2.3 pypy-stm-2.5.1 pypy-1.5-src pypy-1.5 pypy-1.6 pypy-1.7 pypy-1.8 pypy-1.9 pypy-2.0-src pypy-2.0 ... ... pypy3.6-7.3.0 pypy3.6-7.3.1-src pypy3.6-7.3.1 pyston-0.5.1 pyston-0.6.0 pyston-0.6.1 stackless-dev stackless-2.7-dev stackless-2.7.2 stackless-2.7.3 stackless-2.7.4 stackless-2.7.5 stackless-2.7.6 ... @SebaWitowski switowski.com
  • 26. Using pyenv 1. Find Python version to install 2. Install it $ pyenv install 3.9.0 ... # Wait for a few minutes ... # Done! @SebaWitowski switowski.com
  • 27. Using pyenv 1. Find Python version to install 2. Install it 3. Check if it’s installed correctly $ pyenv versions * system 3.9.0 @SebaWitowski switowski.com
  • 28. Using pyenv 1. Find Python version to install 2. Install it 3. Check if it’s installed correctly 4. Start using this version $ pyenv global 3.9.0 # or $ pyenv local 3.9.0 # or $ pyenv shell 3.9.0 @SebaWitowski switowski.com
  • 29. 3 levels of pyenv • pyenv global 3.9.0 - changes the global Python version on your computer @SebaWitowski switowski.com
  • 30. 3 levels of pyenv • pyenv global 3.9.0 - changes the global Python version on your computer • pyenv local 3.9.0 - changes Python version for the current folder and all the sub-folders @SebaWitowski switowski.com
  • 31. 3 levels of pyenv • pyenv global 3.9.0 - changes the global Python version on your computer • pyenv local 3.9.0 - changes Python version for the current folder and all the sub-folders # projectA $ pyenv local 3.9.0 # projectB $ pyenv local 3.6.0 @SebaWitowski switowski.com
  • 32. 3 levels of pyenv • pyenv global 3.9.0 - changes the global Python version on your computer • pyenv local 3.9.0 - changes Python version for the current folder and all the sub-folders • pyenv shell 2.7.18 - changes Python version for the current shell session @SebaWitowski switowski.com
  • 33. Problem with pip You can only have one version of a given package installed! @SebaWitowski switowski.com
  • 34. $ pip install Django ... Django 3.0 installed! Problem with pip @SebaWitowski switowski.com
  • 35. Problem with pip $ pip install Django==2.2 ... ... ... Django 2.2 installed! @SebaWitowski switowski.com
  • 36. $ pip install Django==2.2 ... Django==3.0 uninstalled! ... Django 2.2 installed! Problem with pip @SebaWitowski switowski.com
  • 37. # .../lib/python3.9/site-packages $ ls -al ... drwxr-xr-x 22 switowski 704 Oct 30 12:41 django/ drwxr-xr-x 12 switowski 384 Oct 30 12:41 django_redis/ drwxr-xr-x 16 switowski 512 Sep 28 17:58 docutils/ ... Problem with pip @SebaWitowski switowski.com
  • 38. # .../lib/python3.9/site-packages $ ls -al ... drwxr-xr-x 22 switowski 704 Oct 30 12:41 django/ drwxr-xr-x 12 switowski 384 Oct 30 12:41 django_redis/ drwxr-xr-x 16 switowski 512 Sep 28 17:58 docutils/ ... Problem with pip @SebaWitowski switowski.com
  • 39. Virtual environment If pip installs every package in the same folder, why can’t we tell it to temporarily install them in a different folder? @SebaWitowski switowski.com
  • 40. Virtual environment If pip installs every package in the same folder, why can’t we tell it to temporarily install them in a different folder? Virtual environment: • Creates a special folder with Python binaries • Tells pip to install new packages to that folder • Tells Python to use packages from that folder @SebaWitowski switowski.com
  • 41. Using virtual environments 1. Create new virtual environment $ python -m venv .venv @SebaWitowski switowski.com
  • 42. Using virtual environments 1. Create new virtual environment 2. Activate it $ source .venv/bin/activate @SebaWitowski switowski.com
  • 43. Using virtual environments 1. Create new virtual environment 2. Activate it $ source .venv/bin/activate # Your prompt should change: (venv) $ @SebaWitowski switowski.com
  • 44. Using virtual environments 1. Create new virtual environment 2. Activate it 3. Work on your Python project (install packages, run Python) (venv) $ pip install Django==2.2 ... (venv) $ python manage.py runserver @SebaWitowski switowski.com
  • 45. Using virtual environments 1. Create new virtual environment 2. Activate it 3. Work on your Python project (install packages, run Python) 4. Deactivate virtual environment to stop using it (venv) $ deactivate $ @SebaWitowski switowski.com
  • 46. Typical workflow # Inside Django 3 project folder $ python -m venv django3-app $ source django3-app/bin/activate $ pip install django==3.0 # Inside Django 2 project folder $ python -m venv django2-app $ source django2-app/bin/activate $ pip install django==2.2 @SebaWitowski switowski.com
  • 48. virtualenvwrapper virtualenvwrapper stores all virtual environments in: ~/.virtualenvs/ @SebaWitowski switowski.com
  • 49. virtualenvwrapper virtualenvwrapper stores all virtual environments in: ~/.virtualenvs/ $ mkvirtualenv django2-app - create a virtual environment $ workon django2-app - activate it $ lsvirtualenv - list all virtual environments $ rmvirtualenv django2-app - delete a virtual environment @SebaWitowski switowski.com
  • 51. Global Python packages • Some tools should be installed globally (black, flake8, virtualenvwrapper) @SebaWitowski switowski.com
  • 52. Global Python packages • Some tools should be installed globally (black, flake8, virtualenvwrapper) • But if they require different versions of the same dependency, one of them will break @SebaWitowski switowski.com
  • 53. Global Python packages • Some tools should be installed globally (black, flake8, virtualenvwrapper) • But if they require different versions of the same dependency, one of them will break • Installing global tools into separate virtual environments is a hassle (you have to activate each virtual environment to use that tool) @SebaWitowski switowski.com
  • 54. pipx - global packages in separate environments https://github.com/pipxproject/pipx @SebaWitowski switowski.com
  • 55. pipx in action 1. Install “black” package $ pipx install black installed package black 20.8b1, Python 3.8.5 These apps are now globally available - black - black-primer - blackd done! ✨ 🌟 ✨ @SebaWitowski switowski.com
  • 56. pipx in action 1. Install “black” package 2. Use black $ black hello_world.py reformatted hello_world.py All done! ✨ 🍰 ✨ 1 file reformatted. @SebaWitowski switowski.com
  • 57. pipx in action 1. Install “black” package 2. Use black 3. “black” installed in a virtual env will shadow the global one # Inside a virtual environment (venv) $ black --version black, version 19.3b0 # Outside of a virtual environment $ black --version black, version 20.8b1 @SebaWitowski switowski.com
  • 58. pipx commands $ pipx list - list all installed packages $ pipx uninstall <package> - uninstall package $ pipx upgrade-all - upgrade all packages $ pipx inject pytest pytest-cov - install pytest-cov inside pytest virtual env @SebaWitowski switowski.com
  • 59. Dependencies in your project @SebaWitowski switowski.com
  • 60. Dependencies in your project # requirements.txt Django django-redis pytest @SebaWitowski switowski.com
  • 61. Dependencies in your project # requirements.txt Django django-redis pytest $ pip install -r requirements.txt ... Successfully installed Django-2.2, ... @SebaWitowski switowski.com
  • 62. Dependencies in your project # requirements.txt Django django-redis pytest $ pip install -r requirements.txt ... Successfully installed Django-2.2, ... $ pip install -r requirements.txt ... Successfully installed Django-3.0, ... One month later…
  • 63. Dependencies in your project # requirements.txt Django django-redis pytest $ pip install -r requirements.txt ... Successfully installed Django-2.2, ... $ pip install -r requirements.txt ... Successfully installed Django-3.0, ... One month later…
  • 64. Dependencies in your project # requirements.txt Django>=2.2,<3.0 django-redis==4.12.0 pytest==5.* Dependency pinning: @SebaWitowski switowski.com
  • 65. Dependencies in your project Always pin dependencies on production servers! @SebaWitowski switowski.com
  • 66. Dependencies in your project Always pin dependencies on production servers! And their sub-dependencies (3rd party packages)! @SebaWitowski switowski.com
  • 67. Dependencies in your project Always pin dependencies on production servers! And their sub-dependencies (3rd party packages)! And don’t forget to update packages regularly! @SebaWitowski switowski.com
  • 68. Dependencies in your project Always pin dependencies on production servers! And their sub-dependencies (3rd party packages)! And don’t forget to update packages regularly! That’s a lot of work! @SebaWitowski switowski.com
  • 69. Pipenv and Poetry to the rescue!
  • 70. But do you really need them? @SebaWitowski switowski.com
  • 71. But do you really need them? • What if they stop working? @SebaWitowski switowski.com
  • 72. But do you really need them? • What if they stop working? • What if they get discontinued? @SebaWitowski switowski.com
  • 73. But do you really need them? • What if they stop working? • What if they get discontinued? • Do you really use ALL their features? @SebaWitowski switowski.com
  • 74. Pipenv and Poetry are great @SebaWitowski switowski.com
  • 75. But sometimes a simpler tool is enough Pipenv and Poetry are great @SebaWitowski switowski.com
  • 76. But sometimes a simpler tool is enough Pipenv and Poetry are great https://github.com/jazzband/pip-tools @SebaWitowski switowski.com
  • 78. pip-compile # requirements.in Django>=2.2>,<3.0 pytest # requirements.txt # # This file is autogenerated by pip-compile # To update, run: # # pip-compile requirements.in # attrs==20.2.0 # via pytest django==2.2.17 # via -r requirements.in importlib-metadata==2.0.0 # via pluggy, pytest iniconfig==1.1.1 # via pytest packaging==20.4 # via pytest pluggy==0.13.1 # via pytest py==1.9.0 # via pytest pyparsing==2.4.7 # via packaging pytest==6.1.2 # via -r requirements.in pytz==2020.4 # via django six==1.15.0 # via packaging sqlparse==0.4.1 # via django toml==0.10.2 # via pytest zipp==3.4.0 # via importlib-metadata $ pip-compile requirements.in
  • 79. pip-compile # requirements.txt # # This file is autogenerated by pip-compile # To update, run: # # pip-compile requirements.in # attrs==20.2.0 # via pytest django==2.2.17 # via -r requirements.in importlib-metadata==2.0.0 # via pluggy, pytest iniconfig==1.1.1 # via pytest packaging==20.4 # via pytest pluggy==0.13.1 # via pytest py==1.9.0 # via pytest pyparsing==2.4.7 # via packaging pytest==6.1.2 # via -r requirements.in pytz==2020.4 # via django six==1.15.0 # via packaging sqlparse==0.4.1 # via django toml==0.10.2 # via pytest zipp==3.4.0 # via importlib-metadata @SebaWitowski switowski.com
  • 80. pip-compile # requirements.txt # # This file is autogenerated by pip-compile # To update, run: # # pip-compile requirements.in # attrs==20.2.0 # via pytest django==2.2.17 # via -r requirements.in importlib-metadata==2.0.0 # via pluggy, pytest iniconfig==1.1.1 # via pytest packaging==20.4 # via pytest pluggy==0.13.1 # via pytest py==1.9.0 # via pytest pyparsing==2.4.7 # via packaging pytest==6.1.2 # via -r requirements.in pytz==2020.4 # via django six==1.15.0 # via packaging sqlparse==0.4.1 # via django toml==0.10.2 # via pytest zipp==3.4.0 # via importlib-metadata @SebaWitowski switowski.com
  • 81. pip-compile # requirements.txt # # This file is autogenerated by pip-compile # To update, run: # # pip-compile requirements.in # attrs==20.2.0 # via pytest django==2.2.17 # via -r requirements.in importlib-metadata==2.0.0 # via pluggy, pytest iniconfig==1.1.1 # via pytest packaging==20.4 # via pytest pluggy==0.13.1 # via pytest py==1.9.0 # via pytest pyparsing==2.4.7 # via packaging pytest==6.1.2 # via -r requirements.in pytz==2020.4 # via django six==1.15.0 # via packaging sqlparse==0.4.1 # via django toml==0.10.2 # via pytest zipp==3.4.0 # via importlib-metadata @SebaWitowski switowski.com
  • 82. pip-compile # requirements.txt # # This file is autogenerated by pip-compile # To update, run: # # pip-compile requirements.in # attrs==20.2.0 # via pytest django==2.2.17 # via -r requirements.in importlib-metadata==2.0.0 # via pluggy, pytest iniconfig==1.1.1 # via pytest packaging==20.4 # via pytest pluggy==0.13.1 # via pytest py==1.9.0 # via pytest pyparsing==2.4.7 # via packaging pytest==6.1.2 # via -r requirements.in pytz==2020.4 # via django six==1.15.0 # via packaging sqlparse==0.4.1 # via django toml==0.10.2 # via pytest zipp==3.4.0 # via importlib-metadata @SebaWitowski switowski.com
  • 83. pip-compile # requirements.txt # # This file is autogenerated by pip-compile # To update, run: # # pip-compile requirements.in # attrs==20.2.0 # via pytest django==2.2.17 # via -r requirements.in importlib-metadata==2.0.0 # via pluggy, pytest iniconfig==1.1.1 # via pytest packaging==20.4 # via pytest pluggy==0.13.1 # via pytest py==1.9.0 # via pytest pyparsing==2.4.7 # via packaging pytest==6.1.2 # via -r requirements.in pytz==2020.4 # via django six==1.15.0 # via packaging sqlparse==0.4.1 # via django toml==0.10.2 # via pytest zipp==3.4.0 # via importlib-metadata @SebaWitowski switowski.com
  • 84. pip-compile Now, run: $ pip install -r requirements.txt @SebaWitowski switowski.com
  • 85. pip-compile Now, run: $ pip install -r requirements.txt Need to update dependencies? $ pip-compile requirements.in @SebaWitowski switowski.com
  • 86. pip-compile Make pip-compile part of your CI @SebaWitowski switowski.com
  • 87. pip-compile Make pip-compile part of your CI If something breaks, pin that package in requirements.in @SebaWitowski switowski.com
  • 91. Summary • Use pyenv to install/update Python versions @SebaWitowski switowski.com
  • 92. Summary • Use pyenv to install/update Python versions • Use venv/virtualenvwrapper to isolate dependencies of your projects @SebaWitowski switowski.com
  • 93. Summary • Use pyenv to install/update Python versions • Use venv/virtualenvwrapper to isolate dependencies of your projects • Use pipx to install global tools @SebaWitowski switowski.com
  • 94. Summary • Use pyenv to install/update Python versions • Use venv/virtualenvwrapper to isolate dependencies of your projects • Use pipx to install global tools • Consider pip-tools when you just need to pin dependencies @SebaWitowski switowski.com
  • 95. Where to go next? @SebaWitowski switowski.com
  • 96. Where to go next? “Modern Python Projects” workshop (part of this conference) @SebaWitowski switowski.com
  • 97. Where to go next? “Modern Python Projects” online course https://modernpythonprojects.com/ @SebaWitowski switowski.com