Python Forum
Python Version on Mac OSX - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Python Version on Mac OSX (/thread-15916.html)



Python Version on Mac OSX - Sparkstorm - Feb-06-2019

I am running python 3.7.10 on OSX. I am trying to use speech recognition but that requires PyAudio. After about an hour of searching and failing, most sites said PyAudio wasn't compadible with Python 3.7 or above so I tried to uninstall and reinstall python on a different version. However I've tried deleting every individual file and running rm in terminal but if I type python --version into the command prompt the reply is still Verison 3.7.10. I am trying to install version 3.6.8...Can anyone help?


RE: Python Version on Mac OSX - perfringo - Feb-06-2019

In order to learn what Python versions do you have on your machine type python in terminal and hit TAB. You will see list of versions and configurations.

I believe that virtual environments are solution for this kind of problems. You know, in near future you might need insertion-ordered dictionaries and therefore Python 3.7 but you don't want to break your PyAdio setup. There is built-in venv module and several third party modules like pipenv. You just set up virtual environment with 'right' Python version with needed modules and dependencies


RE: Python Version on Mac OSX - Sparkstorm - Feb-06-2019

Thanks, perfringo. Sorry, I'm new to this. How would I go about setting up a Virtual environment with a different Python version. I've given it a go but I can understand the documentation very well.


RE: Python Version on Mac OSX - perfringo - Feb-06-2019

There is quite straightforward tutorial on Python site: Creating virtual environments.


RE: Python Version on Mac OSX - umerjaved - Feb-06-2019

this is the best solution


RE: Python Version on Mac OSX - Sparkstorm - Feb-06-2019

Thank you for the quick replies perfringo. This is exactly what I wanted!