10
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

virtualenvでpython

Posted at
pip install virtualenv virtualenvwrapper

.bashrcもしくは.zshrcとかに

source /usr/local/bin/virtualenvwrapper.sh

仮想開発環境を作りたいとき

mkvirtualenv python2.7 -p /usr/local/bin/python

-pもしくは--pythonオプションで、その環境で使いたいpythonのPATHを設定

workon python2.7

でその環境に

環境から出たいときは

deactivate

(備考)ついでにpython3とpypyも
brew install python3
mkvirtualenv python3 --python /usr/local/bin/python3
brew install pypy
mkvirtualenv pypy -p /usr/local/bin/pypy
10
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?