Pylons Paster shell 无法在 ipython 中运行
我安装 ipython,然后运行 ./paster shell dev.ini
命令,粘贴打开标准 python 控制台。我怎样才能让它运行ipython?
I install ipython, and then i run./paster shell dev.ini
command, paster open standard python console. How can I make it run ipython?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
以下是它在 Fedora 17 上使用 IPython 0.12、paste-1.7.5.1 和 pylons 1.0 的工作原理:
重置
__name__
是必要的,因为 Pylons/Paste 将__name__
设置为“pylons-admin”
这使 IPython 感到困惑(它尝试通过名称查找主模块)sys.modules
)。Here's how it worked for me on Fedora 17 with IPython 0.12, paste-1.7.5.1 and pylons 1.0:
Resetting
__name__
is necessary because either Pylons/Paste sets__name__
to"pylons-admin"
which confuses IPython (it tries to lookup the main module by its name insys.modules
).我解决了这个问题,将 ipython 降级到 0.10 版本
I solved this problem downgrading ipython to version 0.10
您是否尝试过Pylons Quick Site Development<中的步骤/a>:
Did you try the steps from the Pylons Quick Site Development:
您的 ipython 是否有可能全局安装,但您从 virtualenv 运行 pylon那是
--no-site-packages
?如果是这种情况,那么 pylons 将看不到您安装的 ipython。Is there any chance that your ipython is installed globally, but that you're running pylons from a virtualenv that is
--no-site-packages
? If that's the case, then pylons won't see your installation of ipython.Ipython 最近更新到了 .11 版本。某些组件不再正常工作,尤其是使用第三方库时。检查 pylon 的邮件列表,您可能需要考虑错误报告。
Ipython updated to version .11 just recently. Some of the components no longer work correctly, especially with 3rd party libraries. Check the mailing lists for pylons, and you may want to consider a bug report.
试试这个:
Try this: