-
Notifications
You must be signed in to change notification settings - Fork 58
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
installer silently fails? #17
Comments
Can you try to run it directly ? using Conda
installer = joinpath(Conda.SCRIPTDIR, "installer.exe")
PREFIX = Conda.PREFIX
run(`$installer /S /AddToPath=0 /RegisterPython=0 /D=$PREFIX`) |
|
Running |
Trying to run |
If I move |
Does it matter that my home directory has two spaces in it? Just wondering if this is one of those "script gets confused by whitespace" problems. |
It might be that kind of issue. Other than that, I have no idea ... |
Nope, it still fails silently copying |
Another report of this happening on Windows 10. The user has a space in their user name/home directory. |
As I do not have a windows machine with me, I can not investigate this. If someone can try to dig this bug, I can try to fix it after. |
I have investigated the issue. The core issue is that the quoting of the backticks is wrong and interfere with the argument passing on line: https://github.com/Luthaf/Conda.jl/blob/9dbdbca7e8338a67576bb3e92191b0000cd0d68e/src/Conda.jl#L120
This makes the installer fail silently. This issue has also occurred in JuliaLang/IJulia.jl#211 (comment). @ihnorton's workaround from https://gist.github.com/ihnorton/82dc5b41a537de710ab2 segfualt under 0.4. I cannot figure out why it segfault and it is not a good long term solution. The easiest way to reproduce this failure under windows is:
|
Thank you for taking the time to do this!
Ok, so that is an issue with Julia quoting. Could quoting the path by ourselve fix this ? Like this: `$installer /S /AddToPath=0 /RegisterPython=0 /D="$PREFIX"`
This is messing directly with Win32 API, which I would prefer not have to do. |
It will still quotes wrong.
Anyway the path should not be quoted at all according to my experience, supported by conda/conda#1068 (comment). |
@dhoegh, note that no actual quotation marks are passed to the program, this is just how the backtick commands are printed.
So, the In any case, you can pass explicit quotation marks if you want by `$installer /S /AddToPath=0 /RegisterPython=0 /D=\"$PREFIX\"` (Note backslashes!) |
As conda/conda#1068 (comment) states it should not be quoted and I have also tested the same in a cmd.exe running |
That might actually work, because that should be what the installed is getting as arguments from the shell. |
It would be mildly horrifying if the You can do this by `$installer /S /AddToPath=0 /RegisterPython=0 $(split("/D=$PREFIX"))` (If this works, I'm having trouble imagining with what perverse code |
(This is especially horrifying if you consider paths with multiple spaces, e.g. (Note that the above text does not display correctly because Markdown helpfully strips out the extra spaces, even in |
I have just tested that |
Probably someone should file an Anaconda issue. Not accepting paths with spaces as a single argument, but only as multiple arguments, is ridiculous (and cannot handle paths with multiple spaces as noted above). |
I can confirm that |
A workaround for path with single space inside will already be better than the current implementation. I'll fill an issue at anaconda repo, but let's use the workaround for now! |
Agreed. (This is probably a casualty of the fact that Windows forces programs to do their own command-line parsing.) |
Now I understand what is going on. What I said above was wrong; I keep forgetting how messed-up Windows is. It is literally impossible for Julia to send arguments to a spawned process as an array of individual strings. Windows only allows you to pass arguments as a single "command-line" string, and it forces programs to do their own parsing to split this string into individual arguments. What libuv does when passing arguments containing spaces is to automatically enclose the arguments in double quotes. i.e. However, it is really on a program-by-program basis how the command-line arguments are parsed on Windows. Some programs probably recognize the double quotes and parse accordingly. Some other programs, like The right thing in our cases is to attach the Unfortunately, Julia doesn't currently provide an API for attaching this flag. I'll look into it. |
I have made a PR #22 which also adds the test to appveyor. |
This should probably be closed when a new Conda release is tagged, as the workaround should be good for the common user case. |
Agreed. |
Support for verbatim Windows options has now been merged into Julia 0.5 (JuliaLang/julia@003f415). So, I think you can now do: if VERSION >= "0.5.0-dev+8873" # Julia PR #13780
run(Cmd(`$installer /S /AddToPath=0 /RegisterPython=0 /D=$PREFIX`, windows_verbatim=true))
else
....workaround from PR #22...
end |
I'm trying a 64-bit Windows 8 machine (technically, running on a Mac under VMware fusion) with Julia 0.4.0-rc4, and the miniconda installer seems to silently do nothing:

That is, it runs
installer.exe
and seems to succeed (no error is printed), but nothing seems to be installed (noconda
command or anything else indeps/usr
except forinstaller.exe
itself).Anything I should be trying?
The text was updated successfully, but these errors were encountered: