简体   繁体   English

如何运行reddit.com网站的克隆。 Reddit.com源代码在Ubuntu 9.10上实现时出现错误(karmic)

[英]How to run a clone of reddit.com website. Reddit.com source code gives error while implementing on Ubuntu 9.10 (karmic)

I am implementing the reddit.com source code on ubuntu karmic 9.10. 我正在ubuntu karmic 9.10上实现reddit.com源代码。

I have followed all the steps and in one step where i am using paster command it throws an error. 我遵循了所有步骤,并且在我使用粘贴程序命令的一步中,它引发错误。 $paster shell example.ini $ paster shell example.ini

File "/usr/local/lib/python2.6/dist-packages/Pylons-0.9.6.2- py2.6.egg/pylons/middleware.py", line 11, in from webhelpers.rails.asset_tag import javascript_path ImportError: No module named rails.asset_tag 来自webhelpers.rails.asset_tag导入javascript_path ImportError的文件“ /usr/local/lib/python2.6/dist-packages/Pylons-0.9.6.2- py2.6.egg / pylons / middleware.py”,第11行。没有名为rails.asset_tag的模块

I have checked for the version for webhelpers, its the latest installed. 我已经检查了webhelpers的版本,它是最新安装的。

Could anybody tell me that by installing another version of webhelpers will solve this problem? 有人可以告诉我,通过安装其他版本的webhelpers可以解决此问题吗?

Or Shall i modify the code? 还是我应该修改代码?

Its a reddit.com source code written in python, using pylons framework. 它是使用pylons框架以python编写的reddit.com源代码。

I am unable to decide that whether by installing any previous version of webhelpers helps or shall i modify the code. 我无法决定是通过安装任何早期版本的webhelpers还是对代码进行修改。

If there is anybody who have implemented the reddit.com website please help me or suggest me the best way. 如果有人实施了reddit.com网站,请帮助我或建议我最好的方法。

thanks SIA 谢谢新航

You need to ensure that all the libraries needed by your Reddit clone are on Python's module search path . 您需要确保Reddit克隆所需的所有库都在Python的模块搜索路径中 There are a lot of different ways to accomplish this. 有很多不同的方法可以完成此操作。 The easiest is probably to just use setuptools ' easy_install command to install them (though this is my own personal least favorite way to install Python libraries, and also opens new cans of worms in the form of "Why not use distribute or pip instead?"). 最简单的方法可能是只使用setuptoolseasy_install命令来安装它们(尽管这是我个人最不喜欢的安装Python库的方法,并且还会以“为什么不使用分发pip的形式打开新的蠕虫病毒罐”? )。

The next easiest way is probably to download and unpack the source code for the libraries you need and either a) setup.py install them or b) add their directories to your $PYTHONPATH or sys.path variables. 下一个最简单的方法可能是下载并解压缩所需库的源代码,然后a) setup.py install它们或b)将其目录添加到$PYTHONPATHsys.path变量中。

The documentation linked above has more info on how to control the module search path. 上面链接的文档提供了有关如何控制模块搜索路径的更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM