12
11

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.

Vagrantでpython2.7系の開発環境を構築する方法

Last updated at Posted at 2014-09-08

設定環境

CentOS 6.5
Vagrant 1.6.5

pythonの2.7.6を取得

$ curl -L -O http://python.org/ftp/python/2.7.6/Python-2.7.6.tgz
$ tar zxf Python-2.7.6.tgz
$ cd Python-2.7.6
$ ./configure --prefix=/opt/local

Developer Toolsを管理者権限でインストール

$ sudo yum groupinstall "Development tools"
$ sudo yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel

python2.7.6をインストール

$ cd Python-2.7.6
$ ./configure --prefix=/opt/local
$ sudo make && make altinstall

VirtualEnvをインストール

$ /opt/local/bin/python2.7
$ cd
$ curl -O https://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.11.6.tar.gz
$ tar xvfz virtualenv-1.11.6.tar.gz
$ cd virtualenv-1.11.6
$ sudo /opt/local/bin/python2.7 setup.py install

pipを利用してDjangoとiPythonのモジュールを取得

$ cd
$ /opt/local/bin/virtualenv demo
$ source demo/bin/activate
$ python
$ pip
$ pip install Django ipython
12
11
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
12
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?