免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3555 | 回复: 4
打印 上一主题 下一主题

关于安装trac0.93的问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-02-03 20:10 |只看该作者 |倒序浏览
*安装了trac0.93
*安装了sqlite2.8.17
*安装了pysqlite1.0.1
等等基础模块和依赖包
但是在trac-admin初始化时出错了,在google邮件列表发现有人也遇到这个错误,但没有解决的下文。
希望懂python和trac的朋友帮帮忙,谢谢!
出错信息如下:

[root@localhost trac-0.9.3]# trac-admin /usr/src/yougedi/trac_project3 initenv
Creating a new Trac environment at /usr/src/yougedi/trac_project3

Trac will first ask a few questions about your environment
in order to initalize and prepare the project database.

Please enter the name of your project.
This name will be used in page titles and descriptions.

Project Name [My Project]>

Please specify the connection string for the database to use.
By default, a local SQLite database is created in the environment
directory. It is also possible to use an already existing
PostgreSQL database (check the Trac documentation for the exact
connection string syntax).

Database connection string [sqlite:db/trac.db]>

Please specify the absolute path to the project Subversion repository.
Repository must be local, and trac-admin requires read+write
permission to initialize the Trac database.

Path to repository [/var/svn/test]> /usr/src/yougedi/engine

Please enter location of Trac page templates.
Default is the location of the site-wide templates installed with Trac.

Templates directory [/usr/share/trac/templates]>

Creating and Initializing Project
Failed to create environment. global name 'sqlite' is not defined
Traceback (most recent call last):
File "/usr/lib/python2.3/site-packages/trac/scripts/admin.py", line 141, in env_create
self.__env = Environment(self.envname, create=True, db_str=db_str)
File "/usr/lib/python2.3/site-packages/trac/env.py", line 79, in __init__
self.create(db_str)
File "/usr/lib/python2.3/site-packages/trac/env.py", line 197, in create
db.init_db(self.path, db_str)
File "/usr/lib/python2.3/site-packages/trac/db.py", line 442, in init_db
cls.init_db(**args)
File "/usr/lib/python2.3/site-packages/trac/db.py", line 321, in init_db
cnx = sqlite.connect(path, timeout=int(params.get('timeout', 10000)))
NameError: global name 'sqlite' is not defined
Failed to initialize environment. 1
Traceback (most recent call last):
File "/usr/lib/python2.3/site-packages/trac/scripts/admin.py", line 596, in do_initenv
self.env_create(db_str)
File "/usr/lib/python2.3/site-packages/trac/scripts/admin.py", line 146, in env_create
sys.exit(1)


为什么说sqlite没定义?我已经安装了sqlite2.8.17,pysqlite1.0.1

论坛徽章:
0
2 [报告]
发表于 2006-02-03 21:36 |只看该作者
我看了一下,它需要pysqlite2,不是pysqlite。这是两个不同的包。

论坛徽章:
0
3 [报告]
发表于 2006-02-03 23:42 |只看该作者

谢谢回复!

原帖由 limodou 于 2006-2-3 21:36 发表
我看了一下,它需要pysqlite2,不是pysqlite。这是两个不同的包。


我安装的pysqlite是安装文档中指向的站点。估计没按错包。
下载的包为http://initd.org/pub/software/py ... sqlite-1.0.1.tar.gz

并且文档中有说:
http://projects.edgewall.com/trac/wiki/TracInstall
For SQLite

    * SQLite, version 2.8.x or 3.x
    * PySQLite
          o version 1.0.x (for SQLite 2.8.x) #我安装的pysqlite是1.0.x版本,sqlite2.8.17
          o version 1.1.x or 2.x (for SQLite 3.x)

可是还是找不到'sqlite'的定义。不太懂python.

[ 本帖最后由 bloves 于 2006-2-3 23:47 编辑 ]

论坛徽章:
0
4 [报告]
发表于 2006-02-04 17:35 |只看该作者
不过我查了那块出错的代码,它要的的确是pysqlite2呀。


  1.     import pysqlite2.dbapi2 as sqlite
复制代码


因此我还是建议你安装pysqlite2试一下。而且sqlite只是trac使用的,对于pysqlite包它不再需要独立安装sqlite。当然如果你希望使用使用行的话可能还是需要的。

论坛徽章:
0
5 [报告]
发表于 2006-02-04 19:51 |只看该作者
pysqlite2 => http://initd.org/pub/software/py ... sqlite-2.1.2.tar.gz
是这个吧。
我重新安装了sqlite3.3.3,pysqlite-2.1.2仍然有相同的问题。我在找找问题!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP