如何使用 Jython 和 Eclipse/PyDev 设置 springpython?

发布于 2024-09-27 16:41:03 字数 541 浏览 0 评论 0原文

我在使用 PyDev 和 Jython 设置 SpringPython 时遇到问题,

我通过以下方式安装了 Spring python:

jython setup.py 安装

并且安装程序已成功将库安装到我的 jython 安装中。

看!: alt text

在我的 PyDev 项目中,我选择了 jython 解释器并有 c:\jython2.5.1\Lib\site-我的库路径中的包: alt text

我的 eclipse 环境无法解析新类: alt text

我还需要做什么才能安装这个宝贝?

也许我应该只使用 Java 版本的 spring...

谢谢!

I'm having trouble setting up SpringPython with PyDev and Jython

I've installed Spring python by:

jython setup.py install

and the setup installed the library to my jython installation successfully.

See!:
alt text

In my PyDev project i've selected the jython interpreter and have c:\jython2.5.1\Lib\site-packages in my Library paths:
alt text

My eclipse environment fails to resolve the new classes:
alt text

What else do I need to do to install this baby?

Perhaps I should just be using the Java version of spring...

Thanks SO!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

物价感观 2024-10-04 16:41:03

用于编译 Python 文件的 python 解释器由 PyDev 在项目级别指定。我怀疑虽然您确实安装了 Jython,但您的 Eclipse 项目 (katas) 仍然使用 CPython。

请执行以下步骤来解决此问题:

  • 打开项目属性:右键单击项目文件夹(“katas”)并选择属性
  • 选择选项卡“PyDev - Interpreter” /Grammar"
  • 将 Python 切换为“Jython”

您的文件现在应该使用 Jython 正确编译。

正如提问者本人所指出的,您可能需要重新启动编辑器(或 Eclipse 本身)。

The python interpreter that is used to compile your Python files is specified by PyDev on the project level. I suspect that while you do have Jython installed, your Eclipse project (katas) still uses CPython.

Perform the following steps to fix this:

  • Open your project properties: right-click your project folder ("katas") and select properties
  • Select tab "PyDev - Interpreter/Grammar"
  • Switch Python to "Jython"

Your files should now be compiled correctly using Jython.

As noted by the asker himself, you may need to restart your editor (or the Eclipse itself).

冰雪梦之恋 2024-10-04 16:41:03

原来我只需要重新启动 eclipse 就可以了。

Turns out that I just needed to restart eclipse, there you go.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文