<p><em><strong>Answer:</strong></em> Currently there is not a good way for Singularity to be installed on MacOS. Perhaps, there will be in the future.</p>
<hr />
<p>I've tried and failed to install Singularity on macOS - it needs VirtualBox  or some such virtualization software and a command line utility that makes virtual containers - ultimately there were so many problems that I just gave up. Docker is far easier to install on macOS and there is not a lot of difference IMO. You can use docker to build and test images and then pull them to a place where you have access to singularity and test singularity specific stuff there.</p>
<p>I think Singularity is a lot easier to install on Linux. See here: <a href="https://docs.sylabs.io/guides/3.0/user-guide/installation.html#mac" rel="nofollow noreferrer">https://docs.sylabs.io/guides/3.0/user-guide/installation.html#mac</a></p>
<hr />
<p><strong>EDIT-2</strong></p>
<p>Singularity-Alpha is a Second Life video game related cask (<a href="https://github.com/singularity-viewer/SingularityViewer" rel="nofollow noreferrer">https://github.com/singularity-viewer/SingularityViewer</a>), it is not the Singularity software. Don't waste your time on it, I just tried to test it and realized I'd already tested and discarded it as irrelevant.</p>
<hr />
<p>EDIT: To address your homebrew issue, note that you're installing a cask and it's moving an App to /Applications/. Just typing in commands that should work is not the same as proper testing. Try opening the SingularityAlpha application to see what that does. I'm not saying it'll work, just that you can test it better. Your attempts only show a lack of understanding in how macOS Applications work and how you can(not) access them from the command line or add locations to $PATH like you can on Linux.</p>

CC BY-SA 4.0
2023-06-05T15:18:52.413Z
2023-06-09T22:47:22.957Z
2023-06-09T22:47:22.957Z
Ram RS
<p>I am trying to install Singularity on my MacOS but it doesn't seem to pick up <code>which singularity</code> or <code>singularity --version</code>:</p>
<p><strong>Main Attempt:</strong></p>
<ol>
<li>Install using Homebrew (and install Home-brew):</li>
</ol>
<pre class="lang-bash prettyprint-override"><code>/bin/bash -c &quot;$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)&quot;
brew install --cask --no-quarantine singularity
singularity --version
</code></pre>
<p>resulting in</p>
<pre class="lang-bash prettyprint-override"><code>==&gt; Downloading https://bitbucket.org/router_gray/singularityviewer/downloads/Singularity_Alpha_1_8_9_8709_x86_64.dmg
Already downloaded: /Users/Username/Library/Caches/Homebrew/downloads/d3015dad9cc2d3ef25603a68114f3caf63cb0dd90e03f159405999262392baec--Singularity_Alpha_1_8_9_8709_x86_64.dmg
==&gt; Uninstalling Cask singularity
==&gt; Backing App 'SingularityAlpha.app' up to '/opt/homebrew/Caskroom/singularity/1.8.9.8709/SingularityAlpha.app'
==&gt; Removing App '/Applications/SingularityAlpha.app'
==&gt; Purging files for version 1.8.9.8709 of Cask singularity
==&gt; Installing Cask singularity
==&gt; Moving App 'SingularityAlpha.app' to '/Applications/SingularityAlpha.app'
</code></pre>
<p>Then test using <code>singularity --version</code> with the result</p>
<pre class="lang-bash prettyprint-override"><code>singularity not found
</code></pre>
<p><strong>Attempt 2:</strong></p>
<ul>
<li>Maybe it wants singularity spelled with a capital Singularity instead of lowercase:</li>
</ul>
<pre class="lang-bash prettyprint-override"><code>which Singularity
</code></pre>
<p>resulting in:</p>
<pre><code>Singularity not found
</code></pre>
<p><strong>Attempt 3:</strong></p>
<ul>
<li>Export the path to the bash_profile and the source it</li>
</ul>
<pre class="lang-bash prettyprint-override"><code>export PATH=&quot;/Applications/SingularityAlpha.app/Contents/MacOS:$PATH&quot;
</code></pre>
<p>However, this resulted in the same issue when <code>singularity --version</code> was run. It could not recognize that the singularity was installed.</p>
<p><strong>Attempt 4:</strong></p>
<ul>
<li><p>Explore inside the Singularity app which is installed under '/Applications/SingularityAlpha.app'</p>
</li>
<li><p>The path <code>/Applications/SingularityAlpha.app/Contents/MacOS</code> lead to a file called SingularityAlpha.</p>
</li>
<li><p>Exporting this path in the bash profile and sourcing still lead to the same issue when trying to see if it even recoginzed the singularity using <code>singularity --version</code>.</p>
</li>
</ul>
<p>I have also tried reinstalling it and it still has the same issue. Is there any suggestion for how to install/use Singularity locally as many packages will have to be tested locally on my machine before running it on my HPC?</p>

<singularity>
Singularity And MacOS
# Singularity And MacOS

(Asked by: username_0 on 2023-06-04)

I am trying to install Singularity on my MacOS but it doesn't seem to pick up which singularity or singularity --version:
Main Attempt:

Install using Homebrew (and install Home-brew):

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install --cask --no-quarantine singularity
singularity --version

resulting in
==> Downloading https://bitbucket.org/router_gray/singularityviewer/downloads/Singularity_Alpha_1_8_9_8709_x86_64.dmg
Already downloaded: /Users/Username/Library/Caches/Homebrew/downloads/d3015dad9cc2d3ef25603a68114f3caf63cb0dd90e03f159405999262392baec--Singularity_Alpha_1_8_9_8709_x86_64.dmg
==> Uninstalling Cask singularity
==> Backing App 'SingularityAlpha.app' up to '/opt/homebrew/Caskroom/singularity/1.8.9.8709/SingularityAlpha.app'
==> Removing App '/Applications/SingularityAlpha.app'
==> Purging files for version 1.8.9.8709 of Cask singularity
==> Installing Cask singularity
==> Moving App 'SingularityAlpha.app' to '/Applications/SingularityAlpha.app'

Then test using singularity --version with the result
singularity not found

Attempt 2:

Maybe it wants singularity spelled with a capital Singularity instead of lowercase:

which Singularity

resulting in:
Singularity not found

Attempt 3:

Export the path to the bash_profile and the source it

export PATH="/Applications/SingularityAlpha.app/Contents/MacOS:$PATH"

However, this resulted in the same issue when singularity --version was run. It could not recognize that the singularity was installed.
Attempt 4:

Explore inside the Singularity app which is installed under '/Applications/SingularityAlpha.app'

The path /Applications/SingularityAlpha.app/Contents/MacOS lead to a file called SingularityAlpha.

Exporting this path in the bash profile and sourcing still lead to the same issue when trying to see if it even recoginzed the singularity using singularity --version.


I have also tried reinstalling it and it still has the same issue. Is there any suggestion for how to install/use Singularity locally as many packages will have to be tested locally on my machine before running it on my HPC?

**Tags:** singularity

---

## 1 answers

### Answer by username_1 on 2023-06-05. Score: 3

***Answer:*** Currently there is not a good way for Singularity to be installed on MacOS. Perhaps, there will be in the future.

---

I've tried and failed to install Singularity on macOS - it needs VirtualBox or some such virtualization software and a command line utility that makes virtual containers - ultimately there were so many problems that I just gave up. Docker is far easier to install on macOS and there is not a lot of difference IMO. You can use docker to build and test images and then pull them to a place where you have access to singularity and test singularity specific stuff there.

I think Singularity is a lot easier to install on Linux. See here: <https://docs.sylabs.io/guides/3.0/user-guide/installation.html#mac>

---

**EDIT-2**

Singularity-Alpha is a Second Life video game related cask (<https://github.com/singularity-viewer/SingularityViewer>), it is not the Singularity software. Don't waste your time on it, I just tried to test it and realized I'd already tested and discarded it as irrelevant.

---

EDIT: To address your homebrew issue, note that you're installing a cask and it's moving an App to /Applications/. Just typing in commands that should work is not the same as proper testing. Try opening the SingularityAlpha application to see what that does. I'm not saying it'll work, just that you can test it better. Your attempts only show a lack of understanding in how macOS Applications work and how you can(not) access them from the command line or add locations to $PATH like you can on Linux.


---

