title: Installation of earlier versions of Python (prior to 3.8) fails on Mac with M1 Chip (ARM based Apple Silicon)
body: <p>I have Macbook with Apple M1 Chip in which I have to use Python 3.6.5 for my project. It comes with Python 2.7.16 and 3.8.2 preinstalled. I used <code>brew</code> to install Python which by default installed 3.9.1.</p>
  <p>So, I tried <a href="https://github.com/sashkab/homebrew-python/blob/master/README.md" rel="noreferrer">this</a> homebrew formula to install 3.6.5, but got following error:</p>
  <pre><code>checking for pthread_t... yes
  checking size of pthread_t... 8
  configure: error: Unexpected output of 'arch' on OSX
  
  Do not report this issue to Homebrew/brew or Homebrew/core!
  </code></pre>
  <p>I tried <code>pyenv install 3.6.5</code> , but it fails with similar error as above. Method explained <a href="https://stackoverflow.com/questions/51125013/how-can-i-install-a-previous-version-of-python-3-in-macos-using-homebrew">here</a> by <em>ePi272314</em> to install python with git commit fails because it is no longer supported in homebrew.</p>
  <p>When I try running Terminal with <a href="https://developer.apple.com/documentation/apple_silicon/about_the_rosetta_translation_environment" rel="noreferrer">Rosetta 2</a>  and install python 3.6.5, using above methods, I get the following, or some other compilation error:</p>
  <pre><code>Error: Cannot install in Homebrew under Rosetta 2 in ARM default prefix (/opt/homebrew)!
  </code></pre>
  <p>Finally, I downlaoded dmg file of Python 3.6.5 and installed it. It installed fine and it is visible as a python3 installation at <code>/usr/local/bin/python3</code> but it cannot run.</p>
  <pre><code>kxxxr@Kxxxns-MBP bin % where python3
  /opt/homebrew/bin/python3
  /Library/Frameworks/Python.framework/Versions/3.6/bin/python3
  /opt/homebrew/bin/python3
  /usr/local/bin/python3
  /usr/bin/python3
  kxxxr@Kxxxns-MBP bin % /opt/homebrew/bin/python3 --version
  Python 3.9.1
  kxxxr@Kxxxns-MBP bin % /usr/local/bin/python3 --version
  zsh: killed     /usr/local/bin/python3 --version
  kxxxr@Kxxxns-MBP bin % 
  </code></pre>
  <p>Idle installed by Python dmg file cannot run either (I have admin rights).
  <a href="https://i.stack.imgur.com/CA9BJ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/CA9BJ.png" alt="" /></a></p>
  <p>Lastly came across <a href="https://bugs.python.org/issue41100" rel="noreferrer">this</a> python bug report, which says bug is being fixed for Python 3.8, 3.9 and 3.10. Clearly, it looks like older version will not be supported on M1 chips officially.</p>
  <p>My question is:</p>
  <ol>
  <li>Is there other way to work with Python 3.6.5 on Mac M1? Am I missing anything?</li>
  <li>If not, then please mention that. I will accept that as answer.</li>
  </ol>
  <p>Thanks in advance.</p>