vscode-R
vscode-R copied to clipboard
[MacOS] Cannot get Radian terminal to run in VSCode
Hi,
I am trying to set up Radian in VSC. When I try to launch the R terminal, I get the following error message: The terminal process "/Users/victor/opt/anaconda3/bin/radian" terminated with exit code: 1.
My settings are the following:
"terminal.integrated.inheritEnv": true,
"r.bracketedPaste": true,
"r.rterm.mac": "/Users/victor/opt/anaconda3/bin/radian",
"r.rterm.option": [],
"r.plot.useHttpgd": true
When
- I run
which radian
, I get/Users/victor/opt/anaconda3/bin/radian
as I already had the conda environment. - I run
which R
, I get/usr/local/bin/R
. - I run
which python
, I get/opt/local/bin/python
.
Further,
-
R --version
gets meR version 4.2.2
. -
python --version
gets mePython 3.10.8
. -
radian --version
gets me:
r executable: /Library/Frameworks/R.framework/Resources/bin/R
r version: 4.2.2
python executable: /Users/victor/opt/anaconda3/bin/python3.9
python version: 3.9.12
I am not a pro so I might be asking a stupid question, but I read other similar issues and none of them worked. Some help would be greatly appreciated.
EDIT: For additional information, when running radian
in terminal, I get:
File "/Users/victorkreitmann/opt/anaconda3/bin/radian", line 8, in <module>
sys.exit(main())
File "/Users/victorkreitmann/opt/anaconda3/lib/python3.9/site-packages/radian/app.py", line 108, in main
RadianApplication(r_home, ver=__version__).run(options, cleanup=cleanup)
File "/Users/victorkreitmann/opt/anaconda3/lib/python3.9/site-packages/radian/app.py", line 205, in run
rchitect.init(args=args, register_signal_handlers=True)
File "/Users/victorkreitmann/opt/anaconda3/lib/python3.9/site-packages/rchitect/setup.py", line 49, in init
raise Exception(load_lib_error())
Exception: Cannot load shared library: dlopen(/Library/Frameworks/R.framework/Resources/lib/libR.dylib, 0x000A): tried: '/Library/Frameworks/R.framework/Resources/lib/libR.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/R.framework/Resources/lib/libR.dylib' (no such file), '/Library/Frameworks/R.framework/Resources/lib/libR.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/lib/libR.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/lib/libR.dylib' (no such file), '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/lib/libR.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
I assume this is part of the problem, but I am having trouble figuring exactly why.
Does this occur only in the integrated terminal or also outside vscode? If so, sounds like a radian issue more than a vscode-R issue.
The error looks like your R hasn't been installed with a shared library, see the radian README -- specifically the shared library part.
This issue is stale because it has been open for 365 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.