Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
python_virenv.pdf
Search
Satoshi Ohki
November 15, 2012
Programming
160
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
python_virenv.pdf
社内LTで発表した資料
Satoshi Ohki
November 15, 2012
More Decks by Satoshi Ohki
See All by Satoshi Ohki
カートリプレースPJの全体像と技術選定
roothybrid7
0
1.8k
最近のNative Modules開発について
roothybrid7
0
1.3k
Other Decks in Programming
See All in Programming
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
710
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
280
RAG の “R” を Swift で覗いてみる 〜「意味から探す」検索の仕組み〜
nao_randd
0
140
The Rails Doctrine Decade
koic
2
560
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
760
ジョジョの世界をXRで再現する
mofurune
0
150
CodeRabbitの効果検証と過ごしてみた3ヶ月
armondando
0
220
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
380
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
370
Java 27新機能 / Java 27 new features
kishida
2
220
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.6k
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
240
Featured
See All Featured
So, you think you're a good person
axbom
PRO
2
2.2k
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
860
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
530
It's Worth the Effort
3n
188
29k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.3k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
260
GraphQLとの向き合い方2022年版
quramy
50
15k
Designing Powerful Visuals for Engaging Learning
tmiket
1
600
Leo the Paperboy
mayatellez
10
2.4k
Writing Fast Ruby
sferik
630
63k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.7k
Transcript
MacOSXͰ࡞Δ PythonԾڥ 2012/11/16 roothybrid7 1211݄17༵
։ൃڥߏங • స৬ͯ͠ॳΊͯͷ͓ࣄ!! • Ұ͕͔Γ!? • େม? 1211݄17༵
ͳΜߟ͑ͣ͑Δ • खॱؒҧ͑ͨʔ • ͍Βͳ͍ͷΞϯΠϯετʔϧͰ͖Ͷʔ • ཧπʔϧಈ͔Ͷʔ 1211݄17༵
Pythonͷ։ൃڥ • easy_installͱ͔pipͱ͔ɺsetuptoolsͱ ͔distributeͱ͔Կ͕ҧ͏ͷ? • ϓϩδΣΫτຖʹ༻͢Δύοέʔδ͕ ҟͳΔͱ͖Կ͍͍͑ͷ? 1211݄17༵
ଞʹ • όʔδϣϯΛҙࣝ͠ ͯɺίϚϯυ࣮ߦ͢Μ ͷΊΜͲ͍ • όʔδϣϯΞοϓͨ͠ ͍ͱ͖ɺҠߦΊΜͲ͍ • ڥߏஙࣦഊͨ͠ͱ
͖ɺϦΧόϦ͕ΊΜͲ ͍ 1211݄17༵
ࣦഊΏΔ͞ΕΜ! 1211݄17༵
PythonΠϯετʔϧ • HomebrewͰΠϯετʔϧ͕͓͢͢Ί • brew tap homebrew/versions ͰϦϙδ τϦՃ͢ΔͱΠϯετʔϧՄೳͳόʔ δϣϯ͕૿͑Δ
1211݄17༵
Virtualenv • ԾڥΛ࡞ͬͯ͘ΕΔ • pip install virtualenv • ԾڥΛɺ؆୯ʹՃআ͕Մೳ •
ԾڥͰɺࢦఆͨ͠Pythonͷό ʔδϣϯͰಈ࡞͢ΔͷͰɺ͍͍ͪͪόʔ δϣϯΛҙࣝ͠ͳͯ͘Α͍ 1211݄17༵
Virtualenvwrapper • ͱ͍͑ɺVirtualenv୯ମͩͱԾڥ ΛͲ͜ͷσΟϨΫτϦͰ࡞͔ͨ͠Ͱ ཧ͕ࡶʹͳΔͷͰɺϥούʔ͕༻ҙ͞ Ε͍ͯΔɻ =>͜ΕΛͬͯڥΛߏங(pipͰΠϯε τʔϧ) 1211݄17༵
xshrc(bashrc, zshrc) • virtulenvwrapperΛ ͏ઃఆ • ԾڥҰׅͰཧ • cd(σΟϨΫτϦҠಈ) ͷ࣌ʹউखʹԾڥ
͕ΓସΘΔΑ͏ʹࡉ [alias cd=‘venv_cd’] 1211݄17༵
ԾڥΛ࡞͢Δ $ mkvirtualenv <env> [--python=<python path>] 1211݄17༵
ԾڥΛআ͢Δ $ rmvirtualenv <env> 1211݄17༵
cdͰԾڥΓସ͑ $ workon <env> # ্ͷɺcdͨ͠ͱ͖ʹ`.venv`ϑΝΠϧʹॻ͔Εͨ # env໊ΛݟͯΓସ͑ͯ·͢ # .zshrc(.bashrc)ʹworkonΛ࣮ߦ͢ΔؔΛఆٛ
1211݄17༵
ڥΛҠߦ͢Δ $ pip freeze >requirements.txt $ mkvirtualenv new_env $ pip
install -r requirements.txt 1211݄17༵
͓ΘΓ 1211݄17༵