User:Bourke/escidocadmin

From MPDLMediaWiki
Jump to navigation Jump to search

notes on getting escidocadmin running[edit]

modifications to existing doc ESciDoc_Admin[edit]

Prerequisite for Easy_Install is Setuptools Install link to v0.6c11

Easy_install fails to install turbogears 1.0.3 correctly and leaves dir corrupted. Trying with successor framework pip (simply replace easy_install with pip install, keep old version requirements.

Solution (from Andre)

 $>easy_install -f http://www.turbogears.org/1.0/downloads/1.0.4.4 RuleDispatch

and then turbogears install (with 1.0.4.4)

 $>easy_install  turbogears==1.0.4.4

install sqlite - nightmare[edit]

from[ http://www.turbogears.org/1.0/docs/Database/index.html Turbogears 1.0 database installation] cannot install from package as Ubuntu 10.04 Lucid ships Python 2.6.5 as standard. So:

  • Install development tools (gcc, make, etc.). (already installed long ago)
  • Install SQLite and the SQlite development files. (apt-get install sqlite3 libsqlite3-dev)
  • gete a pysqlite tarball from Google Code repository
  • extract and copy directly under the project directory of the 2.5 virtualenv
  • with virtualenv activated and python2.5 operating run python setup.py build from the extracted pysqlite directory.

Here is the bash history on this last step.

  
  535  virtualenv -p /usr/local/python2.5/bin/python escidcoadmin
  536  cd escidcoadmin/
  537  source bin/activate
  538  easy_install sqlalchemy==0.3.9
  539  easy_install -f http://www.turbogears.org/1.0/downloads/1.0.4.4 RuleDispatch 
  540  easy_install turbogears==1.0.4.4
  541  pwd
  542  ls lib/python2.5/site-packages/
  543  mkdir pysqlite-2.5.6
  544  cd pysqlite-2.5.6/
  545  cp -R ~/Downloads/pysqlite-2.5.6/* .
  546  ls
  547  python -V
  548  python setup.py build
  549  python setup.py install
  550  pwd
  551  cd ..
  552  mkdir src
  553  cd src
  554  cp test.cfg dev.cfg
  555  ls
  556  cd escidocadmin/
  557  cp test.cfg dev.cfg
  558  vi dev.cfg # changed  framework.host= to localhost
  559  tg-admin sql create # gets errors.
  

errors as of --Bourke 16:20, 10 August 2011 (CEST)

 
escidcoadmin)bootuser@bourke-vb-ub-sandbox:~/work/escidcoadmin/src/escidocadmin$ tg-admin sql create
Creating tables at sqlite:///devdata.sqlite
Traceback (most recent call last):
  File "/home/bootuser/work/escidcoadmin/bin/tg-admin", line 8, in <module>
    load_entry_point('TurboGears==1.0.4.4', 'console_scripts', 'tg-admin')()
  File "/home/bootuser/work/escidcoadmin/lib/python2.5/site-packages/TurboGears-1.0.4.4-py2.5.egg/turbogears/command/base.py", line 369, in main
    command.run()
  File "/home/bootuser/work/escidcoadmin/lib/python2.5/site-packages/TurboGears-1.0.4.4-py2.5.egg/turbogears/command/base.py", line 97, in run
    sacommand(command, sys.argv)
  File "<string>", line 5, in sacommand
  File "/home/bootuser/work/escidcoadmin/lib/python2.5/site-packages/TurboGears-1.0.4.4-py2.5.egg/turbogears/command/sacommand.py", line 33, in create
    metadata.create_all()
  File "/home/bootuser/work/escidcoadmin/lib/python2.5/site-packages/SQLAlchemy-0.3.9-py2.5.egg/sqlalchemy/schema.py", line 1241, in create_all
    bind.create(self, checkfirst=checkfirst, tables=tables)
  File "/home/bootuser/work/escidcoadmin/lib/python2.5/site-packages/SQLAlchemy-0.3.9-py2.5.egg/sqlalchemy/engine/base.py", line 699, in create
    self._run_visitor(self.dialect.schemagenerator, entity, connection=connection, **kwargs)
  File "/home/bootuser/work/escidcoadmin/lib/python2.5/site-packages/SQLAlchemy-0.3.9-py2.5.egg/sqlalchemy/engine/base.py", line 729, in _run_visitor
    element.accept_visitor(visitorcallable(conn, **kwargs))
  File "/home/bootuser/work/escidcoadmin/lib/python2.5/site-packages/SQLAlchemy-0.3.9-py2.5.egg/sqlalchemy/schema.py", line 1268, in accept_visitor
    visitor.visit_metadata(self)
  File "/home/bootuser/work/escidcoadmin/lib/python2.5/site-packages/SQLAlchemy-0.3.9-py2.5.egg/sqlalchemy/ansisql.py", line 796, in visit_metadata
    collection = [t for t in metadata.table_iterator(reverse=False, tables=self.tables) if (not self.checkfirst or not self.dialect.has_table(self.connection, t.name, schema=t.schema))]
  File "/home/bootuser/work/escidcoadmin/lib/python2.5/site-packages/SQLAlchemy-0.3.9-py2.5.egg/sqlalchemy/databases/sqlite.py", line 231, in has_table
    while cursor.fetchone() is not None:pass
  File "/home/bootuser/work/escidcoadmin/lib/python2.5/site-packages/SQLAlchemy-0.3.9-py2.5.egg/sqlalchemy/engine/base.py", line 1022, in fetchone
    row = self._fetchone_impl()
  File "/home/bootuser/work/escidcoadmin/lib/python2.5/site-packages/SQLAlchemy-0.3.9-py2.5.egg/sqlalchemy/engine/base.py", line 996, in _fetchone_impl
    return self.cursor.fetchone()
pysqlite2.dbapi2.ProgrammingError: Cannot operate on a closed cursor.

 

manual install python 2.5 on ubuntu[edit]

good (but not perfect) link howto manual install python25 on ubuntu lucid

worked, but virtualenv then failed to use the python executable, failed to load zlib.

suggestion andre:

apt-get install zlib11g-dev and remake. worked