Hoping for some help. How does one pip install a Python package for reticulating from within an RStudio R-Markdown (.Rmd) file?
For example, the lasio Python package is not available through conda. Hence, the following .Rmd code was not able to add the package to my environment:
```{r}
library(reticulate)
py_install("lasio") # did not work
```
I also tried to install the package with Python code (to no avail):
```{python}
import sys
!{sys.executable} -m install lasio # did not work
$ python -m pip install lasio # also did not work
```
Turns out that the lasio package could be installed/added to my environment by typing pip install lasio in RStudio's Terminal window/tab. However, I'm hoping for code that can be run with .R or .Rmd code so as to automate the process when ported to another machine. Thanks.