使用gedit和virtualenv完成塔/金字塔代码

| 我正在研究金字塔文档,并且非常想要代码完成。我安装了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\'
对您能为我提供的任何帮助都会非常感兴趣!     
已邀请:
您应该创建不带
--no-site-packages
参数的virtualenv,以允许访问系统范围内安装的python软件包。     
作为第一个想法,我建议您在
env
virtualenv中运行
pip install pygtk
。你试过了吗?     
如果我是你,我只是不会在您的virtualenv中运行gedit。如果需要,请启动一个新的终端窗口。这似乎比将非开发包安装到您的virtualenv中更干净。 在没有
--no-site-packages
的情况下运行可以起作用,但是有些人认为将virtualenv与系统真正隔离是个好主意,这样您就可以使其与系统完全隔离,并控制no-site-packages选项可以消除这种隔离。     

要回复问题请先登录注册