Comments (17)
Confirmed, its working again at least as far as I am using it, which at the moment is just as:
read_chroms("FID1A.CH",parser="chromconverter",format_in="chemstation_fid")
from chromconverter.
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.
from chromconverter.
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.
from chromconverter.
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.
from chromconverter.
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 .onLoad
function that imports the python modules in try
.
from chromconverter.
I'm assuming you restarted your R session after installing the Microsoft Build Tools?
Yes I did a system reboot, but it didn't help.
It sounds like the trick may be to install the Windows SDK?
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.
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 .onLoad function that imports the python modules in try.
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 devtools::install_github("https://github.com/ethanbass/chromConverter/")
? Or is there some other procedure to test this change? I did a fresh install, and I'm seeing the same issue still. I think try() can be a bit finicky, I know I've had trouble implementing it in the past.
from chromconverter.
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 try
thing myself, because I haven't thought of a way to make the python installation fail on my computer. I thought that it would work though.
from chromconverter.
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
from chromconverter.
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.
Here's some extra error messages that library(chromConverter) is throwing:
Error : Error installing package(s): "\"aston\"", "\"numpy\"", "\"pandas\"", "\"rainbow-api\"", "\"scipy\""
In addition: Warning message:
In shell(fi, intern = intern) :
'C:\Users\regan\AppData\Local\Temp\Rtmpa0OZdx\file14f05f33374.bat' execution failed with error code 1
Error in py_module_import(module, convert = convert) :
ModuleNotFoundError: No module named 'aston'
Error in py_module_import(module, convert = convert) :
ModuleNotFoundError: No module named 'pandas'
Error in py_module_import(module, convert = convert) :
ModuleNotFoundError: No module named 'rainbow'
Error in py_module_import(module, convert = convert) :
ModuleNotFoundError: No module named 'rainbow'
from chromconverter.
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 module not found
errors, since they wouldn't really be needed for troubleshooting. I don't think I should silence the python installation errors because they're probably pretty important for anyone trying to troubleshoot why python isn't installing correctly.
from chromconverter.
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?
from chromconverter.
Maybe try conda env list
in the terminal and see if there's a chromConverter
environment. If so you should be able to activate it and install whatever you want in there. Theoretically, chromConverter should create its own environment through miniconda if everything is working correctly, but reticulate
can be kind of confusing in how it handles the environments since it's behavior is apparently somewhat dependent on how you have python configured.
By the way, the python package that's failing to install (python-lzf) is a dependency of rainbow-api
from chromconverter.
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 rainbow-api
to install somehow or if it errors out with the message about Visual C++
from chromconverter.
Nevermind, i'm pretty sure it is installing in the chromConverter
environment on my computer as I originally thought. In conclusion however, it is very confusing, especially if you have (as I do) multiple versions of conda on your computer.
from chromconverter.
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 sudo apt-get install r-cran-devtools
everything else worked perfectly. I'm running kali linux, but ubuntu or any other debian based linux distro should work equally well. This doesn't solve the windows problem and it will add extra difficulty for getting my data across to my virtual machine, but it bodes well for any linux users.
from chromconverter.
Nice. This is very good to know. Devtools is not an actual dependency by the way. You can also use remotes::install_github
to install from GitHub (not sure if this is easier to install on Linux or not). Or manually download/clone the GitHub repository and just use install.packages
to load it from your hard drive.
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.
from chromconverter.
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
from chromconverter.
Related Issues (18)
- Add R-based parser for Chemstation UV files HOT 1
- Add Shimadzu .lcd parser? HOT 20
- read_chroms() can't find openChrom executable HOT 4
- Python bindings don't work correctly in latest version of RStudio without altering Python settings (ModuleNotFoundError)
- Path interpretation issue in read_chroms HOT 8
- Add support for Waters PDA files HOT 1
- Issue reading in ChemStation .ch files HOT 2
- seeking chemstation version 181 file
- importing cdf (raw) from Waters HOT 8
- Interface to OpenChrom file parsers HOT 1
- Chromatograms from mzXML files HOT 3
- Reading Intensities Correctly HOT 6
- Converting .cdf to .mzml - different parsers? HOT 1
- Weird error when trying to convert to cdf HOT 3
- Path problems with system calls on Windows HOT 30
- Python environment sometimes fails to load on Windows due to dependency issues
- Update chemstation 181 parser to read older FID files HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chromconverter.