3

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!

erbridge
  • 1,376
  • 12
  • 27
storrgie
  • 379
  • 2
  • 3

3 Answers3

2

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

jfs
  • 399,953
  • 195
  • 994
  • 1,670
1

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.

Dan
  • 3,665
  • 1
  • 31
  • 39
  • What's with the random downvote? At least leave a comment to tell why you think the answer isn't helpful! – Dan Feb 12 '13 at 13:34
0

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

brandizzi
  • 26,083
  • 8
  • 103
  • 158