-
Notifications
You must be signed in to change notification settings - Fork 3
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
package fails to load if python dependencies can't be installed on Windows #7
Comments
The generic build tools available via the link in the error message above ("Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/) doesn't fix the problem. But the build tools installer gives a lot of options for what kind of toolset you want to install. I went for a minimal install because other options use a lot of disk space and I have no idea what specifically the python-lzf package actually needs. |
Hmm. That's not good. Did you update your computer or anything like that? It's strange that this would just suddenly happen (I haven't changed anything on the python side recently). I'm assuming you restarted your R session after installing the Microsoft Build Tools? If not, this would be something to try. You might also want to try removing the reticulate package and reinstalling everything in case it's corrupted somehow? I'm pretty unhappy with the fact that the whole package errors out like this if something goes wrong with the python installation, but as far as I've been able to figure out there isn't any way of having python modules as suggested dependencies (at least for CRAN packages).The only way I know of would be to split the python parts into their own separate package and have that other package as a suggested dependency in chromConverter, but that also doesn't seem ideal. |
This seems like a pretty authoritative resource: https://wiki.python.org/moin/WindowsCompilers#Which_Microsoft_Visual_C.2B-.2B-_compiler_to_use_with_a_specific_Python_version_.3F It sounds like the trick may be to install the Windows SDK? I think this is a separate checkbox in the build tools installer, but to be honest I am somewhat mystified by Windows things, being only a reluctant and infrequent Windows user. |
I think I may actually have a solution for the issue with the whole package erroring out due to python dependency problems (25235d1 ). Would be great if you can test it for me. It won't actually help with getting the python stuff to load, but I'm hoping it can allow the package to still load without them. I just wrapped everything in the |
Yes I did a system reboot, but it didn't help.
That's an extra 15.7GB of installation which is a lot on my 450GB hdd. I'm reluctant to try that unless its really, really necessary.
This doesn't seem to have worked, but just to confirm, when you reference a commit like that, will that be incorporated into a fresh install from |
Yes, it should be incorporated with the fresh install, since I added it to the master branch. Just to double check, did you refresh your R session after reinstalling? I've found that sometimes the packages get cached or something and you could still be loading the old version after reinstalling if you haven't loaded a new R session. It's a little hard for me to troubleshoot the |
I guess I might have to go uninstall the weird build tools from the windows computer in the lab. Not sure when i'll be able to get around to that though |
Ok I tried a new r session, I'm still getting error messages, in fact there are more of them, but it does seem to have loaded the chromConverter namespace, so maybe it is working. Let me play around a bit more and I'll confirm.
|
Confirmed, its working again at least as far as I am using it, which at the moment is just as: |
Ah good news! The new error messages are just because it's trying to load all the individual python modules but can't (because they didn't install). Previously, it was erroring out completely on the installation step. I'm going to go ahead and silence the |
Is there a way that I can pre-install the requisite python packages directly through python and make sure they're in the right environment for R to be able to find and use them? |
Maybe try By the way, the python package that's failing to install (python-lzf) is a dependency of |
Actually it kind of seems like everything is just getting installed into the "r-reticulate" environment on my computer (and maybe on yours as well judging by the paths in the output you posted in your first message). So maybe try opening that one from the terminal and see if you can get |
Nevermind, i'm pretty sure it is installing in the |
I did a fresh install of r-studio on a linux virtual machine, and installation of chromConverter went very smoothly on that. The biggest problem was getting devtools to install (it has a lot of system dependencies) but once I figured out that you can install devtools (and all its dependecies) from linux terminal directly with |
Nice. This is very good to know. Devtools is not an actual dependency by the way. You can also use Once i feel like i've arrived at some kind of stopping point with the current round of development I will also push updates back to CRAN. They limit you to one update every 2-3 months, so I don't want to push an update there with a bunch of bugs that I'm going to fix a day or two later. |
I think I'm going to close this for now, since it seems like I've solved the main issue of the package failing to load entirely when the python stuff fails. I opened another issue in #8 about the python environment (sometimes) failing to be configured on Windows, but I'm not sure what I'll really be able to do here other than maybe trying to document the actual requirements better |
Hi Ethan,
Not sure what has happened because this was working previously, but now I'm not able to load the chromConverter package.
From the error message I gather that there are some issues with the python package 'python-lzf' installation process, looks like it needs an install of Microsoft Visual C++, and also I also see this warning:
I'll try manually installing the build tools for Microsoft Visual C++ and see if that resolves the issue, but in the mean time, here's the full output of library(chromConverter):
The text was updated successfully, but these errors were encountered: