virtualenv+virtualenvwrapper : djangoまで入れてみる。

hdknr@deblen:~$ sudo easy_install-2.5 virtualenvwrapper
Searching for virtualenvwrapper
Reading <a href="http://pypi.python.org/simple/virtualenvwrapper">http://pypi.python.org/simple/virtualenvwrapper/</a>
Reading <a href="http://www.doughellmann.com/projects/virtualenvwrapper">http://www.doughellmann.com/projects/virtualenvwrapper/</a>
Best match: virtualenvwrapper 1.20
Downloading <a href="http://www.doughellmann.com/downloads/virtualenvwrapper-1.20.tar.gz">http://www.doughellmann.com/downloads/virtualenvwrapper-1.20.tar.gz</a>
Processing virtualenvwrapper-1.20.tar.gz
Running virtualenvwrapper-1.20/setup.py -q bdist_egg –dist-dir /tmp/easy_install-o4hEJF/virtualenvwrapper-1.20/egg-dist-tmp-oNiIPn
creating /usr/lib/python2.5/site-packages/virtualenvwrapper-1.20-py2.5.egg
Extracting virtualenvwrapper-1.20-py2.5.egg to /usr/lib/python2.5/site-packages
byte-compiling /usr/lib/python2.5/site-packages/virtualenvwrapper-1.20-py2.5.egg/virtualenvwrapper/__init__.py to __init__.pyc
Adding virtualenvwrapper 1.20 to easy-install.pth file
Installing virtualenvwrapper_bashrc script to /usr/bin
Installed /usr/lib/python2.5/site-packages/virtualenvwrapper-1.20-py2.5.egg
Processing dependencies for virtualenvwrapper
Finished processing dependencies for virtualenvwrapper
hdknr@deblen:~$ yolk -l | grep virtual
virtualenv&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; – 1.3.3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; – active
virtualenvwrapper – 1.20&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; – active
hdknr@deblen:~$ which virtualenvwrapper_bashrc
/usr/bin/virtualenvwrapper_bashrc
hdknr@deblen:~$ cd
hdknr@deblen:~$ mkdir .ve.mysite
hdknr@deblen:~$ export WORKON_HOME=$HOME/.ve.mysite
hdknr@deblen:~$ source /usr/bin/virtualenvwrapper_bashrc
hdknr@deblen:~$ workon
*
hdknr@deblen:~$ mkvirtualenv first
New python executable in first/bin/python
Installing setuptools…………………..done.
(first)hdknr@deblen:~$
(first)hdknr@deblen:~$ workon
first
(first)hdknr@deblen:~$ pip install django(first)hdknr@deblen:~$ easy_install-2.5 pip
Searching for pip
Reading <a href="http://pypi.python.org/simple/pip">http://pypi.python.org/simple/pip/</a>
Reading <a href="http://pip.openplans.org">http://pip.openplans.org</a>
Best match: pip 0.4
Downloading <a href="http://pypi.python.org/packages/source/p/pip/pip-0.4.tar.gz#md5=b45714d04f8fd38fe8e3d4c7600b91a2">http://pypi.python.org/packages/source/p/pip/pip-0.4.tar.gz#md5=b45714d04f8fd38fe8e3d4c7600b91a2</a>
Processing pip-0.4.tar.gz
Running pip-0.4/setup.py -q bdist_egg –dist-dir /tmp/easy_install-f-UR-M/pip-0.4/egg-dist-tmp-_-F6m3
warning: no previously-included files matching ‘*.txt’ found under directory ‘docs/_build’
no previously-included directories found matching ‘docs/_build/_sources’
zip_safe flag not set; analyzing archive contents…
pip: module references __file__
Adding pip 0.4 to easy-install.pth file
Installing pip script to /home/hdknr/.ve.mysite/first/bin
Installed /home/hdknr/.ve.mysite/first/lib/python2.5/site-packages/pip-0.4-py2.5.egg
Processing dependencies for pip
Finished processing dependencies for pip
(first)hdknr@deblen:~$ which pip
/home/hdknr/.ve.mysite/first/bin/pip
ちなみにpipだとうまく行かなかったので、easy_install でdjangoを入れてみる。
(first)hdknr@deblen:~$ easy_install-2.5 django
Searching for django
Reading <a href="http://pypi.python.org/simple/django">http://pypi.python.org/simple/django/</a>
Reading <a href="http://www.djangoproject.com">http://www.djangoproject.com/</a>
Reading <a href="http://www.djangoproject.com/download/1.0.1-beta-1/tarball">http://www.djangoproject.com/download/1.0.1-beta-1/tarball/</a>
Best match: Django 1.1
Downloading <a href="http://media.djangoproject.com/releases/1.1/Django-1.1.tar.gz">http://media.djangoproject.com/releases/1.1/Django-1.1.tar.gz</a>
Processing Django-1.1.tar.gz
Running Django-1.1/setup.py -q bdist_egg –dist-dir /tmp/easy_install-tLngfV/Django-1.1/egg-dist-tmp-5a3rjC
zip_safe flag not set; analyzing archive contents…
django.conf.__init__: module references __file__
django.conf.project_template.manage: module references __file__
django.core.servers.basehttp: module references __path__
django.core.management.base: module references __path__
django.core.management.__init__: module references __file__
django.core.management.__init__: module references __path__
django.core.management.sql: module references __file__
django.core.management.commands.loaddata: module references __file__
django.contrib.gis.gdal.tests.test_ds: module references __file__
django.contrib.gis.tests.geoapp.tests: module references __file__
django.contrib.gis.tests.layermap.tests: module references __file__
django.contrib.admindocs.views: module references __path__
django.contrib.admin.__init__: module references __path__
django.contrib.auth.tests.views: module references __file__
django.views.i18n: module references __file__
django.test._doctest: module references __file__
django.test._doctest: module MAY be using inspect.getsourcefile
django.test.simple: module references __file__
django.templatetags.__init__: module references __path__
django.utils.version: module references __path__
django.utils.autoreload: module references __file__
django.utils.translation.trans_real: module references __file__
django.db.__init__: module references __path__
django.db.models.loading: module references __file__
django.template.loaders.app_directories: module references __file__
Adding Django 1.1 to easy-install.pth file
Installing <a href="http://django-admin.py">django-admin.py</a> script to /home/hdknr/.ve.mysite/first/bin
Installed /home/hdknr/.ve.mysite/first/lib/python2.5/site-packages/Django-1.1-py2.5.egg
Processing dependencies for django
Finished processing dependencies for django
(first)hdknr@deblen:~$ <a href="http://django-admin.py">django-admin.py</a> startproject hoge
(first)hdknr@deblen:~$ cd hoge/
(first)hdknr@deblen:~/hoge$
(first)hdknr@deblen:~/hoge$ python <a href="http://manage.py">manage.py</a> shell
Python 2.5.2 (r252:60911, Jan&nbsp; 4 2009, 17:40:26)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
&gt;&gt;&gt; import sys
&gt;&gt;&gt; for x in sys.path:
…&nbsp;&nbsp;&nbsp; print x

/home/hdknr/hoge
/home/hdknr/.ve.mysite/first/lib/python2.5/site-packages/setuptools-0.6c9-py2.5.egg
/home/hdknr/.ve.mysite/first/lib/python2.5/site-packages/pip-0.4-py2.5.egg
/home/hdknr/.ve.mysite/first/lib/python2.5/site-packages/Django-1.1-py2.5.egg
/usr/lib/python2.5/site-packages/yolk-0.4.1-py2.5.egg
/usr/lib/python2.5/site-packages/BeautifulSoup-3.1.0.1-py2.5.egg
/usr/lib/python2.5/site-packages/Trac-0.11.4.ja1-py2.5.egg
/usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg
/usr/lib/python2.5/site-packages
/usr/lib/python2.5/site-packages/boto-1.7a-py2.5.egg
/usr/lib/python2.5/site-packages/django_debug_toolbar-0.7.0-py2.5.egg
/usr/lib/python2.5/site-packages/virtualenv-1.3.3-py2.5.egg
/usr/lib/python2.5/site-packages/pip-0.4-py2.5.egg
/usr/lib/python2.5/site-packages/virtualenvwrapper-1.20-py2.5.egg
/home/hdknr/.ve.mysite/first/lib/python2.5
/home/hdknr/.ve.mysite/first/lib/python2.5/plat-linux2
/home/hdknr/.ve.mysite/first/lib/python2.5/lib-tk
/home/hdknr/.ve.mysite/first/lib/python2.5/lib-dynload
/usr/lib/python2.5
/usr/lib/python2.5/plat-linux2
/usr/lib/python2.5/lib-tk
/home/hdknr/.ve.mysite/first/lib/python2.5/site-packages
/usr/local/lib/python2.5/site-packages
/usr/lib/python2.5/site-packages
/var/lib/python-support/python2.5
&gt;&gt;&gt; from django import *
&gt;&gt;&gt; dir()
[‘VERSION’, ‘__builtins__’, ‘conf’, ‘contrib’, ‘core’, ‘db’, ‘dispatch’, ‘forms’, ‘get_version’, ‘sys’, ‘utils’, ‘x’]
&gt;&gt;&gt; dir(core)
[‘__builtins__’, ‘__doc__’, ‘__file__’, ‘__name__’, ‘__path__’, ‘exceptions’, ‘files’, ‘management’, ‘signals’]
&gt;&gt;&gt; core.__file__
‘/home/hdknr/.ve.mysite/first/lib/python2.5/site-packages/Django-1.1-py2.5.egg/django/core/__init__.pyc’
(first)hdknr@deblen:~/hoge$ python <a href="http://manage.py">manage.py</a> runserver 0.0.0.0:8000
Validating models…
0 errors found
Django version 1.1, using settings ‘hoge.settings’
Development server is running at <a href="http://0.0.0.0:8000">http://0.0.0.0:8000/</a>
Quit the server with CONTROL-C.</p>

カテゴリー: 未分類 パーマリンク

コメントを残す

以下に詳細を記入するか、アイコンをクリックしてログインしてください。

WordPress.com ロゴ

WordPress.com アカウントを使ってコメントしています。 ログアウト / 変更 )

Twitter 画像

Twitter アカウントを使ってコメントしています。 ログアウト / 変更 )

Facebook の写真

Facebook アカウントを使ってコメントしています。 ログアウト / 変更 )

Google+ フォト

Google+ アカウントを使ってコメントしています。 ログアウト / 変更 )

%s と連携中