I am trying to install python version 3.8.7. According to the python documentation (https://docs.python.org/3.8/), this is the most up to date version of 3.8.
but if I run
pyenv install --list
I cannot see version 3.8.7 in the list of available downloads.
Does anyone know why this is or failing that, how I can upgrade to version 3.8.7 on Mac?
This answer helped me solve this https://stackoverflow.com/a/43996315/2327761
By using brew update pyenv pyenv updated to version 1.2.22 and then I could see python version 3.8.7
Related
I install python 3.10 in my new laptop, i used python 3.10 for a long time and i installed lot of package on it, but i need to downgrade it to python 3.8 because python 3.10 cannot support a package, and i found this post but if i remove the whole python, it will also remove all the package, that mean i need to install all the package after i do it. Is there any way to just downgrade the python interpreter?
You can use it pyenv for working with multiple python versions;
curl https://pyenv.run | bash
Look at the available versions;
pyenv install --list
Installing selected version;
pyenv install -v 3.8.1
for more details;
https://realpython.com/intro-to-pyenv/
My understanding is that "brew install python" installs the latest version of python. Why isn't it pulling 3.10? 3.10 is marked as a stable release.
I can install 3.10 with "brew install python#3.10 just fine and can update my PATH so that python and pip point to the right versions. But I am curious why "brew install python" its not installing 3.10.
My other understanding is that 3.10 is directly compatible with the M1 chips so that is why I want 3.10.
Please let me know if I am mistaken.
As Henry Schreiner have specified now Python 3.10 is the new default in Brew. Thx for pointing it
--- Obsolete ---
The "python3" formula is still 3.9 in the brew system
check the doc here:
https://formulae.brew.sh/formula/python#3.9#default
The latest version of the formula for 3.9 also support apple silicon.
If you want to use python3.10 you need to run as you described brew install python#3.10
The reason why 3.9 is still the official python3 formula is that generally user using the vanilla python3 are not looking for the latest revision but the more stable. in some months the transition will done.
Python#3.10 is currently keg-only, which means 3.10 is not the default version yet. You can see a message stating this by typing on the terminal: brew info python#3.10:
python#3.10 is keg-only, which means it was not symlinked into /opt/homebrew,
because this is an alternate version of another formula.
The migration tasks are not yet all done as of July 2022. You can see the latest situation and the details on GitHub: https://github.com/Homebrew/homebrew-core/pull/87075
I've been using Homebrew to install various packages on my Mac. Currently I have Python 2.7.13 installed via Homebrew but I'd like to upgrade to Python 3.5.x, not 3.6 which is brew's current default. At first, I just tried upgrading to Python 3:
brew install python3
Brew said "python 2.7.13 is already installed. To upgrade to 3.6.5, run brew upgrade python" which isn't the version I want.
I then tried to search to see what versions of Python brew has available:
brew search python
Now Homebrew tells me, "If you meant "python" specifically: It was migrated from caskroom/cask to homebrew/core."
I then looked at homebrew-core on Github but it doesn't appear to provide any instructions on how to do what I want to do. Does anyone know how to now display a list of Python versions that one can install using Homebrew and what command to use to install a specific version?
There are several discussions of this, here and elsewhere. There is no direct way to do what you want. The recommended approach is to install pyenv via brew, and use pyenv to manage the different versions of Python on your system.
The github repo has a very detailed and clear guide on usage:
https://github.com/pyenv/pyenv
To see the version of python use python --version, and for upgrade use sudo apt-get upgrade python.
I used this, and it's worked
I have MacOS Sierra (10.12.6) and had Python 2.7.13 until I did brew upgrade and now it is showing 2.7.10
What is the best proven/safest way to upgrade to latest python 2.x (at this moment 2.7.14)?
It is curious Python 2.7.13 in Sierra. I thought that Apple has only included Python 2.7.10 for since at least as far back as El Capitan and still on High Sierra. I am on High Sierra and python -v is still 2.7.10 for example. I skipped Sierra so I don't know from personal experience on that one.
You are probably typing python -V in a terminal right? Are you sure which version of python is being found first in the path? Brew can't overwrite Sierra's Python (SIP would protect it from anything trying to change the included Python version) and installs it in usr/local. Brew is the best way I know of for installing Python and you have multiple versions of Python installed with Brew. Take a look in your /usr/local/bin folder. ls /usr/local/bin/python* at the terminal will do it. You probably will have a python2 and maybe a python3 in there, maybe more than one. Brew puts a number after Python for the major version to distinguish it from the system Python. Assuming everything went smooth with Brew then at the terminal you should be able to type python2 -V and or python3 -V depending on which version of python you installed with brew. A reasonably good tutorial for setting up Python on a mac is here http://docs.python-guide.org/en/latest/starting/install/osx/
If you have brew installed and Python 2.x.x run...
brew upgrade python#2
If you have brew installed and no Python 2.x.x run...
brew install python#2
I have python 3.4.4, 3.5.2 and 2.7 on my Ubuntu machine. I already have pip3 installed but it is for version 3.5.2. I want to download pip for version 3.4.4 as this is the version I code in. I have seen the questions posted here on SO but none of them worked for me.
Answer was found in another question here
Change python path in $PATH to python3.4
export PATH=/path/to/python3.4/bin:$PATH