New submission from Alex Regueiro:

Quotes around hashbangs are not recognised and are considered invalid syntax, 
at least on Bash on OS X 10.12. There's really no workaround (that I'm aware 
of) for paths containing spaces, except maybe symlinking the directory in the 
path the contains the space. Maybe a warning message about this would be best.

To reproduce this issue, simply run the following from an empty directory that 
has a space in its path:

pyenv venv/
source ./venv/bin/activate

The result should be something like:
-bash: /Users/me/dir with space/foo/venv/bin/pip: "/Users/me/dir: bad 
interpreter: No such file or directory

messages: 278676
nosy: alexreg
priority: normal
severity: normal
status: open
title: pyvenv generates malformed hashbangs for scripts
type: behavior
versions: Python 3.5

Python tracker <>
Python-bugs-list mailing list

Reply via email to