Closed firasm closed 2 years ago
Hello!
In the environment where you start jupyter lab, run the following command to check if styler can be imported in the jupyter server
python -c "import rpy2.robjects.packages as rpackages; print(rpackages.importr('styler'))"
If there is any error there, then we have correctly diagnosed the problem, we just need to make R and styler available in the jupyter server.
Hi!
Excellent sleuthing! Running that command did give me an error:
▶ python -c "import rpy2.robjects.packages as rpackages; print(rpackages.importr('styler'))"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'rpy2'
But it looks like I was missing a dependency rpy2
, which I've now installed using
pip install rpy2
and things are now working perfectly!
Closing the issue since this fixes my problem.
Checklist prior to opening an issue
Describe the bug I'm trying to use the
styler
R formatter, but I keep getting a messageFormatter styler not found!
even though I've installed it throughinstall.packages('styler')
and I can successfully import it in an R jupyter notebook.Diagnostic commands Please attach the output of the following commands (please format them properly)
pip freeze
jupyter labextension list
jupyter serverextension list
Additional context
Autoformatting in Python notebooks works as expected!
Here are my full user prefs on the config file: