• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Python setup
 

Python setup

on

  • 2,066 views

 

Statistics

Views

Total Views
2,066
Views on SlideShare
2,066
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Python setup Python setup Presentation Transcript

  • NLTKPython NLTK Study at Kauli 2011. 07. 26 Nekoya
  • NLTK
  • OK
  • CentOS NLTKPython
  • Python CentOS 5.5 - Python 2.4.3 2.6
  • EPELhttp://fedoraproject.org/wiki/EPEL epel-release-5-4.noarch.rpm
  • EPEL$ sudo rpm -ivh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
  • Python2.6 RPM$ sudo yum install python26python26-libs python26-devel
  • virtualenv /usr/local Sandbox Python
  • virtualenv virtualenvwrapper pythonbrew
  • virtualenv$ sudo yum install python-virtualenv
  • virtualenv$ virtualenv --python=/usr/bin/python26/nltk/python /nltk/python/ virtualenv
  • virtualenv$ source /nltk/python/bin/activate virtualenv active .bashrc OK
  • mod_wsgi Apache WSGI (?) uWSGI
  • mod_wsgi uWSGI server-status
  • mod_wsgi$ sudo yum install python26-mod_wsgi mod_wsgi 2.4
  • httpd.confLoadModule wsgi_module modules/python26-mod_wsgi.soWSGIPythonHome "/nltk/python"#WSGIPythonPath "/nltk/python/lib/python2.6/site-packages"<VirtualHost *:80> ServerName localhost WSGIScriptAlias / /nltk/test.py</VirtualHost>
  • wsgi application import nltkfrom wsgiref import simple_serverdef application(environ, start_response):    start_response(200 OK, [(Content-type, text/plain)])    return dir(nltk)if __name__ == __main__:    server = simple_server.make_server(, 5000, application)    server.serve_forever()