Strange behavior with editable installs and virtualenv

Anonymous avatarAnonymous created an issue

I have this config:

parts =

recipe = rjm.recipe.venv
no_site_packages = true

recipe = gp.recipe.pip
virtualenv = ${buildout:directory}
install =
    -e svn+
$ ./bin/buildout
$ ./bin/python -c "import gunicorn"
$ ./bin/python -c "import django"

After a second buildout, there's an error:

$ ./bin/buildout
$ ./bin/python -c "import gunicorn"
$ ./bin/python -c "import django"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named django

After the third, django reinstalls correctly

$ ./bin/buildout
$ ./bin/python -c "import gunicorn"
$ ./bin/python -c "import django"

This behaviour is reproducible with every -e install

If we remove the virtualenv, everything is fine and packages are installed under parts/pip/

It is also impossible to pass a custon environment like:

install =
    -E /my-venv/ -e svn+

Comments (2)

  1. Anonymous


    I think that the correct interface for using editable installs is to use the keyword "editables": editables = svn+

    The problem you will run into is that it moves every link of site-packages in develop-eggs !

    Maybe that's why you have the import problem (just check where is your .egg-link).

    I'll ask the author to stop moving the *.egg-link.

    For you environment problem, by default it uses the current virtual environment, so cannot specify another virtual environment.

  2. Alex Robbins

    Hey, I'm experiencing the same problem.

    It looks like the issue has to do with the easy-install.pth file. My installation alternates between working and not. If I add a new item while the others aren't working, then they are stuck alternating with one working, then the other as I rerun bin/buildout.

    It looks like if a package is already in easy-install.pth, then it is dropped. If it is not in easy-install.pth, then it is added. If easy-install.pth would have no packages, then it is deleted.

    Any ideas why this might be happening?

    Thanks, Alex

  3. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.