-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Cygwin: pip install fbprophet fails with Error 11 - Resource temporarily unavailable #92
Comments
Update - python3 doesn't seem to have any issues forking for me... I don't know what could be causing the error.
...
|
Results are the same if I just try build from source git clone...
|
I ran the pip install command through strace. From what I can tell, it looks like pip tries and fails to delete its temporary pip build directory after doing a lot of compilation work, possibly because its open/locked elsewhere (given the error). I could be reading this wrong, but at least the details are here below for someone who may know better. Hope it helps. I sure would love to try out fbprophet!
|
I think this is the first report of Prophet in Windows via Cygwin. In Windows Python not-via-cygwin, there is an ongoing issue that is preventing successful installation (#2) which seems to be an upstream issue in PyStan not supporting matrix multiplication in Windows (stan-dev/pystan#308). You do have a different error however, so it would be great if you could check that PyStan is working with matrix multiplication. This code is a simple test that PyStan is working at all (sounds like it is):
This code will test matrix multiplication, which is currently failing in Windows not-cygwin:
|
@bletham thanks for responding! Your suspicions are confirmed. There is no issue with pystan when running your test code:
|
How about the second block with matrix multiplication? |
@bletham I get no errors... was there supposed to be more to the code snippet?
|
If these code snippets work, what do I need to do to get fbprophet installed? I'm about to take a look at the installation scripts, see if I can find out where pip is trying to delete it's build directory, and modify that code. However I doubt I'll have the same success as the developers who wrote the actual installer suite. Anybody out there? I have rstan working. I just need to get prophet to install. |
PyStan is definitely working, and the issue here is not the same issue that prevented installation from working in Windows without Cygwin. My best guess is that there is something specific to Cygwin that is causing it to not work. Can you try installing directly from source, to take pip out of the equation? |
I did, @bletham. I also dug into the source of the build scripts and into the source of pystan and found and fixed/worked around two separate issues in order to get prophet installed and working. I will follow up with an explanation as soon as I get the chance to document what I did. Both problems come down to pystan and it's dynamic pickling/unpickling its models both during install and post install. A more elegant solution probably needs to be implemented. |
Alright. During build, setup.py uses a loop to go through two model types by name ("linear", "logistic"), and compile them with pystan. The first iteration of the loop works as expected, but at some point during the second iteration there is a failure. Some part of the code refers back to the model that pystan compiled in the first iteration. Therein lies the problem -- when calling on pystan to compile a model, it subsequently deletes the temporary directory it used to run the compilation commands, and the files that were produced go away. (see /usr/lib/python{whatever}/site-packages/pystan/model.py). At the time of writing this comment, the relevant code lies on line 319 and calls I got around this first problem by modifying the loop in setup.py so that it only built the first model. Then I ran The second problem happened when I tried running prophet. Again, the culprit is pystan. Just a few lines above the rmtree() call, it writes out I solved the problem by modifying model.py to include an |
Thanks for the thorough breakdown of the issue. I'm a bit unsure of why it would have a problem compiling both models. They should be built entirely independently, I don't see where in the build script it would be referring to the linear model while building logistic (https://github.com/facebookincubator/prophet/blob/master/python/setup.py#L35-L40). Regardless it sounds like in Cygwin PyStan is unable to load compiled models from a pickle. This is the recommended way to persist a PyStan model, so I'm not sure what workarounds there may be until there is an upstream fix. |
I wouldn't say pystan is unstable on cygwin. It's working fine for me now that it's installed and proper file permissions are being set on unpickled models via my changes to model.py. It's quite stable. It's just not portable... Not without an upstream fix. Please consider this issue closed with prophet and I'll report the problem to the pystan devs and send a pull request. You've been very helpful. Thank you! |
I'm going to close this for now and if the upstream issues are fixed we can revisit this. |
I'm from almost two years later and this whole msys-python |
@cnlohr see my solution above - #92 (comment) |
Oh I just saw this after I did this: https://stackoverflow.com/a/12006549/2926815 << that worked, too... and is different. This seems like a much, much simpler solution. Now I am scratching my head how the one in #92 would have worked for my case, but shrug? |
I have pystan and all prerequisites installed on cygwin, windows 7 64 bit. When I attempt to install fbprophet via pip, I get the following error with no further details...
Is this because python3 can't fork properly on windows? I've already done a rebaseall and verified cygwin core components as part of the exercise leading up to this while getting pystan installed (no small feat). Am I doing something wrong?
The text was updated successfully, but these errors were encountered: