Autocompletion: system packages have precedence over buildout-configured ones?


I've got an issue with pycharm.

I'm using its buildout support, which would work pretty fine if it weren't for a glitch: if a distribution exists both in the system path and in an egg installed with buildout, the former takes precedence even though the latter is really used in the project.

Try it yourself:

hg clone


alan@afra:~/temp$ hg clone

destination directory: pycharm_buildout_completion

requesting all changes

adding changesets

adding manifests

adding file changes

added 6 changesets with 20 changes to 14 files

updating to branch default

13 files updated, 0 files merged, 0 files removed, 0 files unresolved

alan@afra:~/temp$ cd pycharm_buildout_completion/

alan@afra:~/temp/pycharm_buildout_completion$ ls

asd  buildout.cfg  run

alan@afra:~/temp/pycharm_buildout_completion$ ./run


Extracting in /tmp/tmpHqT0kk

Now working in /tmp/tmpHqT0kk/distribute-0.6.14

Building a Distribute egg in /tmp/tmpmCle9Z


install_dir /tmp/tmpmCle9Z

Creating directory '/home/alan/temp/pycharm_buildout_completion/bin'.

Creating directory '/home/alan/temp/pycharm_buildout_completion/parts'.

Creating directory '/home/alan/temp/pycharm_buildout_completion/eggs'.

Creating directory '/home/alan/temp/pycharm_buildout_completion/develop-eggs'.

Generated script '/home/alan/temp/pycharm_buildout_completion/bin/buildout'.


  distribute version 0.6.14;


Develop: '/home/alan/temp/pycharm_buildout_completion/.'

install_dir /home/alan/temp/pycharm_buildout_completion/develop-eggs/tmpeZC21cbuild

Getting distribution for 'zc.recipe.egg'.

install_dir /home/alan/temp/pycharm_buildout_completion/eggs/tmp3mOJ3D

Got zc.recipe.egg 1.3.2.

Installing python.

Getting distribution for 'Twisted'.

install_dir /home/alan/temp/pycharm_buildout_completion/eggs/tmpEBfRA6

Got Twisted 10.2.0.

Generated script '/home/alan/temp/pycharm_buildout_completion/bin/main'.

Generated interpreter '/home/alan/temp/pycharm_buildout_completion/bin/python'.

Installing ep.

there're two scripts that get generated, main and python . The path for the twisted egg is correct, comes before the system-wide package in sys.path and it gets used when the script is invoked:

alan@afra:~/temp/pycharm_buildout_completion$ bin/python

>>> import twisted

>>> twisted

<module 'twisted' from '/home/alan/temp/pycharm_buildout_completion/eggs/Twisted-10.2.0-py2.6.egg/twisted/__init__.pyc'>

On the contrary, If I try to use the autocompletion, pycharm seems to give precedence to the system-installed twisted package:


This happens on Ubuntu Maverick 64 bit with PyCharm 1.1.1

If you think this is a bug I could open a ticket.


Please sign in to leave a comment.