refined-lamp-53907
02/17/2023, 1:52 PMreticulate::use_*env or reticulate::use_python to activate the environment for use with the R package.
When I try to test a flow that loads our package, it seems to fail at the step where my package is trying to find the Python environment it needs. I have attached a script and the error message, however, please know that the package I'm loading is not available to the public yet. I can share any code that might be helpful for understanding the problem.
Do you have any general advice on how to use reticulate and Python within R packages so that they operate smoothly with other R packages that have their own Python dependencies? In addition, are there any Metaflow-specific adjustments I could make to my package to enable interoperability?
Best,
Justinstraight-shampoo-11124
02/17/2023, 5:15 PM@conda in this case to make reticulate work nicer.
Mixing the two approaches can lead to difficulties since the two systems are competing and overlapping.
It sounds like you are taking the second approach, which is cool. Note that if you want to execute the code remotely, you need to make sure that the same environment is available in a Docker image used for remote executions.
I'd suggest that you first make it work without Metaflow and once it works, then you can include Metaflow in the mix. Metaflow by itself shouldn't require anything specialstraight-shampoo-11124
02/17/2023, 5:16 PMreticulate in general?refined-lamp-53907
02/20/2023, 11:42 AMMETAFLOW_PYTHON environment variable before loading the Metaflow package. I'll see if this solves the problem. Thanks again @straight-shampoo-11124.straight-shampoo-11124
02/20/2023, 8:42 PM