Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package unavailable MacOS ARM64 #156

Closed
momoai96 opened this issue Aug 10, 2021 · 18 comments
Closed

Package unavailable MacOS ARM64 #156

momoai96 opened this issue Aug 10, 2021 · 18 comments
Labels
arm Related to ARM build platform osx Related to OSX build platform

Comments

@momoai96
Copy link

Hey guys,

I followed your installation guide and set up a conda environment.
I'm currently working on macOS Big Sur 11.5.1 Arm 64 with Apple Silicon.

After setting up channels, I tried : "conda install ros-noetic-desktop", but received only an error:

"PackagesNotFoundError: The following packages are not available from current channels:

  • ros-noetic-desktop"

What am I doing wrong?

@Tobias-Fischer
Copy link
Collaborator

Hi @momoai96, many thanks for your interest in RoboStack! Unfortunately ros-noetic-desktop is not yet available for Apple Silicon - please refer to this table for available packages. You can still run the "standard" osx64 packages via Rosetta though, including ros-noetic-desktop.

We are currently stuck with some cross-compilation issues - if you are interested, have a look here. @wolfv - do you have any suggestions how to get around the issue? Do we have an osx-arm64 machine for conda-forge that we could use to build packages natively?

@momoai96
Copy link
Author

Thanks for your fast answering!
What are the steps to install Ros noetic with Rosetta?

@Tobias-Fischer
Copy link
Collaborator

Hi, please refer to this issue to create a conda environment that uses Intel packages. Let us know if it works :)

@Tobias-Fischer Tobias-Fischer added arm Related to ARM build platform osx Related to OSX build platform labels Aug 11, 2021
@momoai96
Copy link
Author

Hey Guys,

sorry for my late answer, got some work to do with my master thesis.
I followed your installation steps and first it seemed to work.

After opening a terminal, activating my env and call RVIZ, I received :
" Could not contact ROS master at [http://localhost:11311], retrying..."

Any tips?

@momoai96
Copy link
Author

Forget everything! :)
After calling Roscore in a different terminal it worked well!
Thank you Guys! You did amazing stuff!

@waasnipun
Copy link

waasnipun commented Sep 21, 2021

@momoai96 Did it work? I am still getting the same error even after switching to intel. Any help?

Error -
PackagesNotFoundError: The following packages are not available from current channels:

  • ros-noetic-desktop

@Tobias-Fischer
Copy link
Collaborator

Please also provide the command/steps that you used. It's very hard to debug the issue with just an error message.

@momoai96
Copy link
Author

@waasnipun

yes, it worked really well!
No problems!

Just create a conda env based on rosetta to emulate osx-64.
Afterwards you can install ros noetic.
Run Roscore in a new terminal to work as usual!

@waasnipun
Copy link

First I ran this to emulate osx-64

CONDA_SUBDIR=osx-64 conda create -n robostackenv python=3.8
conda env config vars set CONDA_SUBDIR=osx-64
conda deactivate robostackenv
conda activate robostackenv
echo "CONDA_SUBDIR: $CONDA_SUBDIR"

Then ran

conda config --env --add channels conda-forge
conda config --env --add channels robostack
conda config --env --set channel_priority strict

conda install ros-noetic-desktop

This was the error

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  • ros-noetic-desktop

Current channels:

To search for alternate channels that may provide the conda package you're
looking for, navigate to

https://anaconda.org

and use the search bar at the top of the page.

@Tobias-Fischer
Copy link
Collaborator

I think you need to call conda env config vars set CONDA_SUBDIR=osx-64 after conda activate robostackenv. At the moment, it is still looking for packages in the osx-arm64 subdirectory.

In worst case, you can prepend CONDA_SUBDIR=osx-64 to call conda/mamba calls (we really suggest using mamba instead of conda).

@waasnipun
Copy link

CONDA_SUBDIR=osx-64 mamba install ros-noetic-desktop worked. Thanks

@Tobias-Fischer
Copy link
Collaborator

Just an update: on ROS2 Galactic, we now have ros-galactic-desktop natively for the M1. If there is interest to get the same working on Noetic, I could point a volunteer to some relevant commits & patches to get the same working for Noetic.

@Tobias-Fischer
Copy link
Collaborator

We now have a significant chuck of packages. Note that RoboStack/ros-galactic#73 is still an issue.

@sylarevan
Copy link

Hi there.

I'm trying to install ROS Noetic on my mac M1 (12.2). So far no success, as it seems to always miss a package during the installation of the ros-noetic-desktop package.

  • with python=3.9:
Encountered problems while solving:
  - package ros-noetic-desktop-1.5.0-py39heb88ffd_15 requires ros-noetic-viz, but none of the providers can be installed
  • with python=3.8:
Encountered problems while solving:
  - package ros-noetic-desktop-1.5.0-py38hb43b470_13 requires ros-noetic-joint-state-publisher-gui, but none of the providers can be installed

The environment is correctly configured to use Rosetta as per the link mentioned above.

Any idea on how to solve this? Thanks!

@Tobias-Fischer Tobias-Fischer reopened this Feb 1, 2022
@Tobias-Fischer
Copy link
Collaborator

Could you please specify the exact commands you are running so it's easier to reproduce the issue?

@sylarevan
Copy link

sylarevan commented Feb 1, 2022

Yes sure.
Here are the exact commands I used, from the very beginning:

  • First, installation of mambaforge through brew (I'm using fish shell):
brew install mambaforge
conda init fish
  • Next, the environment configuration:
CONDA_SUBDIR=osx-64 conda create -n robostack_rosetta python=3.8
conda activate robostack_rosetta
conda env config vars set CONDA_SUBDIR=osx-64
conda deactivate
conda activate robostack_rosetta

Here CONDA_SUBDIR is correctly defined when re-activating the environment (echo $CONDA_SUBDIR gives osx-64).

  • Finally, RoboStack itself:
conda config --env --add channels robostack-experimental
conda config --env --add channels robostack
conda config --env --set channel_priority strict
mamba install ros-noetic-desktop

Here is what is present in my environment:

sylar@macsylvain ~> mamba list                                                                                                                 (robostack_rosetta)
# packages in environment at /opt/homebrew/Caskroom/mambaforge/base/envs/robostack_rosetta:
#
# Name                    Version                   Build  Channel
ca-certificates           2021.10.8            h033912b_0    conda-forge
libcxx                    12.0.1               habf9029_1    conda-forge
libffi                    3.4.2                h0d85af4_5    conda-forge
libzlib                   1.2.11            h9173be1_1013    conda-forge
ncurses                   6.3                  he49afe7_0    conda-forge
openssl                   3.0.0                h0d85af4_2    conda-forge
pip                       22.0.2             pyhd8ed1ab_0    conda-forge
python                    3.8.12          h43ca1e7_3_cpython    conda-forge
python_abi                3.8                      2_cp38    conda-forge
readline                  8.1                  h05e3726_0    conda-forge
setuptools                60.6.0           py38h50d1736_0    conda-forge
sqlite                    3.37.0               h23a322b_0    conda-forge
tk                        8.6.11               h5dbffcc_1    conda-forge
wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
xz                        5.2.5                haf1e3a3_1    conda-forge
zlib                      1.2.11            h9173be1_1013    conda-forge

And the exact output of mamba install ros-noetic-desktop with an environment defined for python 3.8:

Looking for: ['ros-noetic-desktop']

robostack/noarch         [====================] (00m:00s) No change
robostack/osx-64         [====================] (00m:00s) No change
robostack-experimental/n [====================] (00m:00s) No change
robostack-experimental/o [====================] (00m:00s) No change
conda-forge/noarch       [====================] (00m:01s) Done
conda-forge/osx-64       [====================] (00m:05s) Done

Pinned packages:
  - python 3.8.*


Encountered problems while solving:
  - package ros-noetic-desktop-1.5.0-py38hb43b470_13 requires ros-noetic-joint-state-publisher-gui, but none of the providers can be installed

So it seems that the packages with the correct architecture (osx-64) are used.

Depending on the python version, the error is not the same. With python 3.9, ros-noetic-viz seems not available this time.

EDIT: some additional information on sources:

> conda config --show-sources

==> /opt/homebrew/Caskroom/mambaforge/base/.condarc <==
channels:
  - conda-forge

==> /Users/sylar/.condarc <==
channels:
  - conda-forge

==> /opt/homebrew/Caskroom/mambaforge/base/envs/robostack_rosetta/.condarc <==
channel_priority: strict
channels:
  - robostack
  - robostack-experimental
  - conda-forge

==> envvars <==
subdir: osx-64

@Tobias-Fischer
Copy link
Collaborator

Packages are now available natively on osx-arm64. Simply mamba install ros-noetic-desktop (without the CONDA_SUBDIR stuff) should work. Let me know.

@sylarevan
Copy link

sylarevan commented Feb 2, 2022

Hi @Tobias-Fischer. I've switched to the osx-64 architecture since the package ros-noetic-viz was missing when installing ros-noetic-desktop yesterday with an arm64 architecture. I can confirm this not the case anymore today!
Anyway, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arm Related to ARM build platform osx Related to OSX build platform
Projects
None yet
Development

No branches or pull requests

4 participants