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
Related
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
Thanks in advance for any help you can provide.
I've installed Python3 on my MacBook using Homebrew. This is so I can access the latest version (3.7.5).
However I've recently updated to Catalina, which already has Python3 installed (3.7.3).
The problem is, when I type "python3" into the Command Line, it starts the MacOS version of Python (3.7.3) not the latest version I've installed using Homebrew.
Is there a way I can make sure I'm always accessing my dev/Homebrew version of Python?
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 just upgraded python to version 3.4. However, the pip wasn't installed by default for some reason. So I'm trying to install pip using the command "sudo easy_install pip." But when I typed the command, it gives me an error:
python version 3.4.0 can't run /usr/bin/easy_install. Try the alternative(s):
/usr/bin/easy_install-2.5 (uses python 2.5)
/usr/bin/easy_install-2.6 (uses python 2.6)
/usr/bin/easy_install-2.7 (uses python 2.7)
Run "man python" for more information about multiple version support in
Mac OS X.
So, I looked through online to find out how to update easy_install to version 3.4, but I could not find any source. Does anyone know how to update the version of easy_install?
To cut to the problem of pip, you can just use the get-pip.py script from the pip site.
Download the file: https://raw.github.com/pypa/pip/master/contrib/get-pip.py
And then run python get-pip.py, provided your account has administrator access.
Source: http://pip.readthedocs.org/en/latest/installing.html#install-or-upgrade-pip
I know this question is a bit old, but I just upgraded to python 3.4.2 on my Mac and running 'pip install ' wasn't working for me either.
I found this link: https://www.python.org/dev/peps/pep-0439/
which says to use 'pip3' instead of 'pip' and this worked perfectly for me.