Open nicolopadovan opened 1 year ago
Can you post the output of a few things:
arch
and post the output. E.g. for me this shows arm64
R
to launch the R console. What is the Platform? e.g. mine:
R version 4.2.2 (2022-10-31) -- "Innocent and Trusting"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: aarch64-apple-darwin20 (64-bit)
conda info
into the terminal and post the output? Particularly important are the channel URLs and platform.python -c "import platform; print(platform.machine())"
into your Terminal and post the outputBasically the error suggests you have mostly arm64 stuff, but an x86 python environment or x86 radian. So most likely your conda setup got polluted. I use miniforge3 the conda-forge conda release on my M1 with no issues, so I suspect it's the anaconda settings.
Can you post the output of a few things:
- in the terminal type
arch
and post the output. E.g. for me this showsarm64
- In termnial, type
R
to launch the R console. What is the Platform? e.g. mine:R version 4.2.2 (2022-10-31) -- "Innocent and Trusting" Copyright (C) 2022 The R Foundation for Statistical Computing Platform: aarch64-apple-darwin20 (64-bit)
- you installed radian using conda, can you please type
conda info
into the terminal and post the output? Particularly important are the channel URLs and platform.- type
python -c "import platform; print(platform.machine())"
into your Terminal and post the outputBasically the error suggests you have mostly arm64 stuff, but an x86 python environment or x86 radian. So most likely your conda setup got polluted. I use miniforge3 the conda-forge conda release on my M1 with no issues, so I suspect it's the anaconda settings.
arch
outputs arm64
R
outputs R version 4.2.2 (2022-10-31) -- "Innocent and Trusting" Copyright (C) 2022 The R Foundation for Statistical Computing Platform: aarch64-apple-darwin20 (64-bit)
conda info
ouputs:
active environment : base
active env location : /Users/nico/opt/anaconda3
shell level : 1
user config file : /Users/nico/.condarc
populated config files : /Users/nico/.condarc
conda version : 22.11.1
conda-build version : 3.22.0
python version : 3.9.13.final.0
virtual packages : __archspec=1=x86_64
__osx=10.16=0
__unix=0=0
base environment : /Users/nico/opt/anaconda3 (writable)
conda av data dir : /Users/nico/opt/anaconda3/etc/conda
conda av metadata url : None
channel URLs : https://conda.anaconda.org/conda-forge/osx-64
https://conda.anaconda.org/conda-forge/noarch
https://repo.anaconda.com/pkgs/main/osx-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/osx-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /Users/nico/opt/anaconda3/pkgs
/Users/nico/.conda/pkgs
envs directories : /Users/nico/opt/anaconda3/envs
/Users/nico/.conda/envs
platform : osx-64
user-agent : conda/22.11.1 requests/2.28.1 CPython/3.9.13 Darwin/22.3.0 OSX/10.16
UID:GID : 501:20
netrc file : None
offline mode : False
python -c "import platform; print(platform.machine())"
outputs x86x64
Thanks for your quick response and thanks in advance for your help
Ok your conda info shows: all osx-64
channels, aka x86, and same for platform.
And your python is, as a result, x86 and not arm64.
Compare with mine, showing osx-arm64
:
conda info (nap-test) ─╯
active environment : nap-test
active env location : /Users/piotrsobolewski/Dev/miniforge3/envs/nap-test
shell level : 2
user config file : /Users/piotrsobolewski/.condarc
populated config files : /Users/piotrsobolewski/Dev/miniforge3/.condarc
/Users/piotrsobolewski/.condarc
conda version : 22.9.0
conda-build version : not installed
python version : 3.10.8.final.0
virtual packages : __osx=13.1=0
__unix=0=0
__archspec=1=arm64
base environment : /Users/piotrsobolewski/Dev/miniforge3 (writable)
conda av data dir : /Users/piotrsobolewski/Dev/miniforge3/etc/conda
conda av metadata url : None
channel URLs : https://conda.anaconda.org/conda-forge/osx-arm64
https://conda.anaconda.org/conda-forge/noarch
package cache : /Users/piotrsobolewski/Dev/miniforge3/pkgs
/Users/piotrsobolewski/.conda/pkgs
envs directories : /Users/piotrsobolewski/Dev/miniforge3/envs
/Users/piotrsobolewski/.conda/envs
platform : osx-arm64
user-agent : conda/22.9.0 requests/2.27.1 CPython/3.10.8 Darwin/22.2.0 OSX/13.1
UID:GID : 501:20
netrc file : None
offline mode : False
So if you want to use all native arm64 tooling, you will need a new conda install that's actually arm64 native. My suggestion would be miniforge3, the conda-forge project conda install:
https://github.com/conda-forge/miniforge
I personally use mamba
, which is much faster than vanilla conda.
Note: this is a small install, just what you need to make envs and install stuff.. my understanding is that anaconda packs a ton of packages by default, so if you need that, then I'm not sure the best path.
Thank you again. Would I need to uninstall conda and re-install it using miniforge? Or do I just need to uninstall the packages and then use miniforge to install them?
I'm not sure, I've never had multiple conda, so I can't say. If you don't need the x86 conda for anything specific, then probably best to nuke it, otherwise you're apt to have situations where you can't be sure which conda is active.
I'm not sure, I've never had multiple conda, so I can't say. If you don't need the x86 conda for anything specific, then probably best to nuke it, otherwise you're apt to have situations where you can't be sure which conda is active.
I can delete the current conda no problem: my doubt is why it has installed x86-xx when I installed conda using the ARM installer :/
No idea—I've been using the conda-forge conda from the beginning because it had arm64 support while anaconda didn't.
If you only care about radian, you could probably use the macOS system python3...
No idea—I've been using the conda-forge conda from the beginning because it had arm64 support while anaconda didn't.
If you only care about radian, you could probably use the macOS system python3...
I will give it a try immediately and eventually close the issue if solved :)
I have seen that others have been having the same problem, but none of the solutions provided seems to be helpful.
Here's the error when trying to use radian (both when trying to attach the VSCode R Session Watcher and when running
r
orradian
in the terminal.conda install -c conda-forge radian
) on RootWhen trying to attach, VSCode yields the following error:
The terminal process "/Users/nico/opt/anaconda3/bin/radian '--no-save', '--no-restore'" terminated with exit code: 1.
I am guessing that maybe one between R, Python or Radian I have installed is not ARM, but the error doesn't seem to be proving this hypothesis right. I also see that some files are stated as MISSING - which is the reason why I tried uninstalling and reinstalling R, VSCode, Anaconda, Radian - same results.
For completeness: I did add these lines to the
~/.zshrc
file:alias r="radian"
export R_HOME=/Library/Frameworks/R.framework/Resources