Strange behavior with editable installs and virtualenv

Create issue
Issue #8 new
Former user created an issue

I have this config:

{{{ [buildout] parts = venv pip

[venv] recipe = rjm.recipe.venv no_site_packages = true

[pip] recipe = gp.recipe.pip virtualenv = ${buildout:directory} install = gunicorn -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. Former user Account Deleted


    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