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
Transcript
15 slides
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༵
More Decks by Satoshi Ohki
See All by Satoshi Ohki
カートリプレースPJの全体像と技術選定
roothybrid7
0
1.9k
最近のNative Modules開発について
roothybrid7
0
1.3k
Other Decks in Programming
See All in Programming
3回つくってわかった、 定期実行ジョブ基盤の本質情報
takai
4
3.9k
Getting Started with Vibe Coding
miccheng
0
220
Vue.jsで作る空間解析アプリとCapacitorプラグインのData Bridge
hal_spidernight
1
170
そのデザイントークン、Flutterでも同じ見た目になりますか?
nakamizu
0
340
S3 TablesのIcebergデータに、AIエージェントからアクセスしてみた / 20261016developersio2026joetsu-accessing-iceberg-in-s3tables-via-agent
kasacchiful
PRO
0
310
우리의 Nitro Modules는 당신의 Turbo Modules보다 아름답다
l2hyunwoo
0
260
AWS CDKを理解するために公式の定義を深掘って解説してみる / Understanding AWS CDK by Digging into Its Official Definition
akihisaikeda
3
300
Seven New Principles of Software Engineering
yegor256
0
490
Zero-Tap Sign-In対応、結局何をすればいいの?
mitohato14
0
2.1k
Web Framework Benchmark Battle 2026, Any%
a_matsuda
3
3.2k
Crash Auto Pipelines
veronikapj
1
410
作れるエンジニアから、価値を届けるエンジニアへ
ryunakayama
1
280
Featured
See All Featured
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
900
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
590
Into the Great Unknown - MozCon
thekraken
41
2.8k
A designer walks into a library…
pauljervisheath
211
25k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.7k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
940
Believing is Seeing
oripsolob
1
280
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
560
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
280