Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I'm trying to include some c++ code into a R visual script. I have no problem when doing so on Power BI desktop, but after publihsing to the service, I get the following error, despite Power BI services supposedly supporting the Rcpp library:
Error in sourceCpp(code = code, env = env, rebuild = rebuild, cacheDir = cacheDir, :
Error 65535 occurred building shared library.
WARNING: The tools required to build C++ code for R were not found.
Please download and install the appropriate version of Rtools: http://cran.r-project.org/bin/windows/Rtools/
From this I understand that Rcpp can't find the c++ compiler. Is there anything I can do to point Rcpp to the compiler (and if so, how/where to point ?)
Solved! Go to Solution.
Update:
I contacted microsoft support and they told me that "Rcpp" package is supported but not the "Rtools" package, on which Rcpp depends to compile c++ code. IMO this should mean that "Rcpp" should be delisted as supported package, as it's really rather pointless without Rtools, but they are very adament about keeping the "Rcpp" listed as a supported package, so there will probably be no change.
In summary, you can't use Rcpp on powerBI service and there is no plan to change that.
Best Regards 🙂
Update:
I contacted microsoft support and they told me that "Rcpp" package is supported but not the "Rtools" package, on which Rcpp depends to compile c++ code. IMO this should mean that "Rcpp" should be delisted as supported package, as it's really rather pointless without Rtools, but they are very adament about keeping the "Rcpp" listed as a supported package, so there will probably be no change.
In summary, you can't use Rcpp on powerBI service and there is no plan to change that.
Best Regards 🙂
Hi , @much_cheese
According to your description, it work fine in Power BI Desktop but in Service it takes an error.
you can refer to these document to ensure that it meets the prerequisites and there are no restrictions:
viewing-r-visuals-in-the-power-bi-service
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
It indeed works fine on Power BI Desktop. I've went through the link you sent (again), and still it seems to me all prerequisits are being met. The only thing that catches my attention, is that it's stated that the R scripts are run in a "sandbox environment"
The Power BI service applies a sandbox technology to protect users and the service from security risks.
This sandbox approach imposes some restrictions on the R scripts running in the Power BI service, such as accessing the Internet, or accessing to other resources that aren't required to create the R visual.
So perhaps this sandbox environment doesn't have access to a c++ compiler. But if this is the case, I feel like the enitre Rcpp library is rendered useless, and therefore should not be listed as supported.
Another thought that crossed my mind, and I'm not entirely sure how Azure is handled in different organisations (like each organisation using the same environments, or does each organisation setup it's own environment ?) is that maybe my organisation doesn't have the environment setup right or something. Could someone mabye run the simple R script from my earlier reply on their Power BI Service, to see if they get the same error ?
@Greg_DecklerNot that I can tell. Even something as basic as this throws the error:
library(Rcpp)
@much_cheese The Service supports Rcpp version 1.0.1. The current version is 1.0.9, are you using something from a later version?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
58 | |
20 | |
19 | |
18 | |
9 |