使用 gedit 和 virtualenv 完成 pylons/pyramid 代码

发布于 2024-11-03 08:24:05 字数 1043 浏览 0 评论 0原文

我正在研究金字塔文档,并且非常希望代码完成。我安装了 gedit-plugin-codecompletion

我正在使用 virtualenv,创建后,我使用 bin/ 文件夹中的“activate”文件来切换终端窗口。当我启动 gedit 时,我看到这些错误:

(env)agd@hephaestus:~/Dev/projects/LearningPyramid$ gedit 

** (gedit:11418): WARNING **: Error initializing Python interpreter: could not import pygtk.

** (gedit:11418): WARNING **: Please check the installation of all the Python related packages required by gedit and try again.

** (gedit:11418): WARNING **: Cannot load python plugin Python 'Bracket Completion' since gedit wasnot able to initialize the Python interpreter.

** (gedit:11418): WARNING **: Error loading plugin 'Bracket Completion'

** (gedit:11418): WARNING **: Cannot load python plugin Python 'Evolved Code Completion' since gedit wasnot able to initialize the Python interpreter.

** (gedit:11418): WARNING **: Error loading plugin 'Evolved Code Completion'

我对您能帮助我的任何事情都非常感兴趣!

I am working through the pyramid documentation and would really like code completion. I installed gedit-plugin-codecompletion

I am using virtualenv, once created I use the 'activate' file in the bin/ folder to switch over my terminal window. When I launch gedit I see these errors:

(env)agd@hephaestus:~/Dev/projects/LearningPyramid$ gedit 

** (gedit:11418): WARNING **: Error initializing Python interpreter: could not import pygtk.

** (gedit:11418): WARNING **: Please check the installation of all the Python related packages required by gedit and try again.

** (gedit:11418): WARNING **: Cannot load python plugin Python 'Bracket Completion' since gedit wasnot able to initialize the Python interpreter.

** (gedit:11418): WARNING **: Error loading plugin 'Bracket Completion'

** (gedit:11418): WARNING **: Cannot load python plugin Python 'Evolved Code Completion' since gedit wasnot able to initialize the Python interpreter.

** (gedit:11418): WARNING **: Error loading plugin 'Evolved Code Completion'

Would be very interested in anything you can help me with!

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

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

发布评论

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

评论(3

药祭#氼 2024-11-10 08:24:05

您应该创建不带 --no-site-packages 参数的 virtualenv,以允许访问系统范围内安装的 python 包。

You should create your virtualenv without --no-site-packages argument to allow access to python packages installed system-wide.

智商已欠费 2024-11-10 08:24:05

如果我是你,我就不会在你的 virtualenv 中运行 gedit。如果需要,启动一个新的终端窗口。它看起来比将非开发包安装到 virtualenv 中更干净。

在没有 --no-site-packages 的情况下运行也可以,但有些人认为让 virtualenv 与系统真正隔离是一个好主意,这样您就可以保持它完全隔离并控制 no-site -packages 选项消除了这种隔离。

If I were you, I just wouldn't run gedit from within your virtualenv. Start a new terminal window if you must. It just seems cleaner than installing non-development packages into your virtualenv.

Running without --no-site-packages could work, but some people think it's a good idea to keep your virtualenv truly isolated from your system so that you can keep it completely isolated and controlled the no-site-packages option removes that isolation.

倚栏听风 2024-11-10 08:24:05

作为第一个想法,我建议您在 env virtualenv 中运行 pip install pygtk。你尝试过吗?

As a first idea, I'd suggest you to run pip install pygtk in your env virtualenv. Have you tried it?

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