-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pipenv creates virtualenvs in ~/Library/Application Support on OSX, so binaries can be unrunnable #2321
Comments
I don’t think the file being created in |
if virtualenv doesn't properly create shebangs that seems like a virtualenv issue also, I didn't realize that was a problem. But yeah, that pip command can easily be replaced |
The shebang is a very deeply-rooted problem in POSIX—the spec does not provide a way to handle spaces in executable path at all. The was a long discussion in virtualenv (or pip or Setuptools or bpo, I forget), and the conclusion was something like “POSIX is broken, no can do”. The best thing we can do is to avoid those files altogether. |
@uranusjr if pipenv considers the virtualenvs it creates to be public (i.e. if an end user is supposed to be able to run stuff from within it either directly or indirectly), then the same problem would occur for any other binary that the end-user package installs (it wouldn't be runnable without explicitly calling @techalchemy virtualenv makes no guarantees about where you (a user of it) create your virtualenv. |
Indeed, it would be nice if we could suggest a better default, even provide warnings when user sets it to an ill-adviced value. Again, contributions are welcomed. |
@uranusjr how do you feel about the option I chose (putting venvs in ~/.local/share/virtualenvs even on OSX)? |
Do you happen to know what virtualenvwrapper does on Mac? We can just copy the behaviour (unless they also defaults to |
virtualenvwrapper has a WORKON_HOME envvar, which it asks you to set, but if it's not set, it defaults to |
doesn't pew do that natively though? |
(I have no access to a mac, I have literally no clue what happens with pew + mac) |
Have never used pew, I use my own tool, but yeah looks like it also uses
~/.local/share even on OSX
https://github.com/berdario/pew/blob/master/pew/pew.py#L54
…On Sun, Jun 10, 2018, 18:32 Dan Ryan ***@***.***> wrote:
(I have no access to a mac, I have literally no clue what happens with pew
+ mac)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2321 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAUIXqVf3ZfOltzQtGcB0Y-BG0uTy8pAks5t7Z6JgaJpZM4UeiVW>
.
|
happy to test any pew/virtualenvwrapper + mac stuff if needed |
I think this has since been fixed, see get_workon_home()'s implementaion in the current latest commit in master. |
Need to fill this in with full steps to reproduce, since I suspect this should be easily reproduced in a much simpler project than the first one that I'm trying pipenv with, but pipenv is putting virtualenvs in ~/Library/Application Support (which is at first thought the right place to put them on OSX, but:), which can make even
pipenv install
itself fail:From dropping into a debugger, what's actually happening there is pipenv is trying to subprocess
~/Library/Application\ Support/virtualenvs/Mux-zp_HsCah/bin/pip
, but that file has a shebang with a space in it, so that's not a runnable binary, even though it exists. One could get around that by using~/Library/Application\ Support/virtualenvs/Mux-zp_HsCah/bin/python -m pip
instead (inpipenv.core
), but FWIW for this reason in my own virtualenv tool I had to choose to not follow the OSX convention of usingApplication Support
and put binaries in the linux location (~/.local/share/virtualenvs
).The text was updated successfully, but these errors were encountered: