Issues

Issue #146 new

add2virtualenv fails in a pypy virtualenv

Alex Gaynor
created an issue

At least, I think that's what the problem, either it fails with a tmpenv or with pypy :)

{{{

!bash

alex@alex-gaynor-laptop:~/projects/django$ mktmpenv -p pypy Running virtualenv with interpreter /usr/local/bin/pypy New pypy executable in 849ef6515c4e1627/bin/pypy Installing setuptools............done. Installing pip...............done. virtualenvwrapper.user_scripts creating /home/alex/.virtualenvs/849ef6515c4e1627/bin/predeactivate virtualenvwrapper.user_scripts creating /home/alex/.virtualenvs/849ef6515c4e1627/bin/postdeactivate virtualenvwrapper.user_scripts creating /home/alex/.virtualenvs/849ef6515c4e1627/bin/preactivate virtualenvwrapper.user_scripts creating /home/alex/.virtualenvs/849ef6515c4e1627/bin/postactivate virtualenvwrapper.user_scripts creating /home/alex/.virtualenvs/849ef6515c4e1627/bin/get_env_details This is a temporary environment. It will be deleted when you run 'deactivate'. (849ef6515c4e1627)alex@alex-gaynor-laptop:~/.virtualenvs/849ef6515c4e1627$ cd - /home/alex/projects/django (849ef6515c4e1627)alex@alex-gaynor-laptop:~/projects/django$ add2virtualenv pwd ERROR: currently-active virtualenv does not appear to have a site-packages directory

}}}

Comments (4)

  1. Doug Hellmann repo owner

    I haven't been testing with pypy (I need to install it so I can do that), so it is likely the code that tries to figure out where site-packages lives has issues PyPy. What does 'virtualenvwrapper_get_site_packages_dir' produce if you run it directly?

  2. Alex Gaynor reporter

    On further testing, yes this is an issue with pypy and add2virtualenv, not temp envs.

    alex@alex-gaynor-laptop:~/projects/rupypy$ mktmpenv -p pypy
    Running virtualenv with interpreter /usr/local/bin/pypy
    New pypy executable in 5db93ad6df2e7027/bin/pypy
    Installing setuptools............done.
    Installing pip...............done.
    virtualenvwrapper.user_scripts creating /home/alex/.virtualenvs/5db93ad6df2e7027/bin/predeactivate
    virtualenvwrapper.user_scripts creating /home/alex/.virtualenvs/5db93ad6df2e7027/bin/postdeactivate
    virtualenvwrapper.user_scripts creating /home/alex/.virtualenvs/5db93ad6df2e7027/bin/preactivate
    virtualenvwrapper.user_scripts creating /home/alex/.virtualenvs/5db93ad6df2e7027/bin/postactivate
    virtualenvwrapper.user_scripts creating /home/alex/.virtualenvs/5db93ad6df2e7027/bin/get_env_details
    This is a temporary environment. It will be deleted when you run 'deactivate'.
    (5db93ad6df2e7027)alex@alex-gaynor-laptop:~/.virtualenvs/5db93ad6df2e7027$ virtualenvwrapper_get_site_packages_dir
    /home/alex/.virtualenvs/5db93ad6df2e7027/lib/python2.7
    1.9/site-packages
    
  3. bassio

    I got this error when I tried to use add2virtualenv in a python 3.4 virtualenv created using python 3.4's python -m venv command. (rather than virtualenv)

  4. Log in to comment