Notes about the virtual python
===============================
Function: double a mirror of the system python to your own,
such that you can further use it to creat your own Lib (especially
for site-pages
Usage: we test it on the coates:
-$module load python
-$ which python
/apps/coates/Python-2.5.2/bin/python # this is the system python
# To install the virtual-python
-$ module load python
-$ python virtual-python.py
-$ which python
-$ /home/ba01/u117/usename/bin/python
# go ahead to download the pages you need: unzip it and find each setup.py
# dirct to the local folder of that page, then lunch::
-$ /home/ba01/u117/usename/bin/python setup.py install
# Now test:
-bash-3.2$ python
Python 2.5.2 (r252:60911, Apr 8 2010, 10:22:54)
[GCC 4.4.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import nltk
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named nltk
>>> exit()
-bash-3.2$ /home/ba01/u117/usename/bin/python
Python 2.5.2 (r252:60911, Apr 8 2010, 10:22:54)
[GCC 4.4.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import nltk
>>> dir(nltk)
usename: your user login name
No comments:
Post a Comment