Issue #163 resolved

No such file or directory (preactivate)

Morgan Sutherland
created an issue

I have an issue similar to issue #143, but the provided solution didn't work for me.

Here's the error I get:

~: workon holiday-rsvp
virtualenvwrapper.user_scripts could not run "/Users/morgan/.virtualenvs/holiday-rsvp/bin/preactivate": [Errno 2] No such file or directory

Here's the verbose error:

~/code/holiday-rsvp/holiday: workon holiday-rsvp
virtualenvwrapper.hook_loader Running pre_activate hooks
stevedore.extension found extension EntryPoint.parse('user_scripts = virtualenvwrapper.user_scripts:pre_activate')
virtualenvwrapper.user_scripts pre_activate
virtualenvwrapper.user_scripts running ['/Users/morgan/.virtualenvs/preactivate', 'holiday-rsvp']
virtualenvwrapper.user_scripts running ['/Users/morgan/.virtualenvs/holiday-rsvp/bin/preactivate', 'holiday-rsvp']
virtualenvwrapper.user_scripts could not run "/Users/morgan/.virtualenvs/holiday-rsvp/bin/preactivate": [Errno 2] No such file or directory
virtualenvwrapper.hook_loader Saving sourcable pre_activate hooks to /var/folders/tj/w237fsjj1zndkytbs8f9dq6h0000gn/T/virtualenvwrapper-pre_activate-hook-XXXXXXXXXX.rYwYqPmx
virtualenvwrapper.hook_loader Running post_activate hooks
virtualenvwrapper.hook_loader Saving sourcable post_activate hooks to /var/folders/tj/w237fsjj1zndkytbs8f9dq6h0000gn/T/virtualenvwrapper-post_activate-hook-XXXXXXXXXX.MeANX0dp
stevedore.extension found extension EntryPoint.parse('user_scripts = virtualenvwrapper.user_scripts:post_activate_source')
stevedore.extension found extension EntryPoint.parse('project = virtualenvwrapper.project:post_activate_source')
virtualenvwrapper.user_scripts post_activate

I'm running a fresh install of Mountain Lion.

Comments (5)

  1. Morgan Sutherland reporter
    -bash: /Users/morgan/.virtualenvs/myenv/bin/preactivate: bash: bad interpreter: No such file or directory

    Just like in #143.

    Note: I'm running everything inside tmux and

    $ echo $SHELL
  2. Morgan Sutherland reporter

    I can confirm that changing the shebang in ~/.virtualenvs/myenv/bin/preactivate to #!/user/bin/env bash (as #143 did) fixes the issue for me.

    However, unlike #143, I'm running stock OS X 10.8 and haven't made any non-standard changes, except perhaps installing a newer version of bash with Homebrew. I'm also, of course, running inside of tmux.

  3. Log in to comment