I followed a video online and tried to download pip using terminal, but it doesn't work. It showed a path of python2.7, but I am actually using python3.5, is it the problem?
The most simple way is to use OS X package manager called brew
. Install brew from your console:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
And after:
brew install python3.5
or
brew install python3
Well so the problem is the default Python version is 2.
There is both Python 2 and Python 3 on your machine, if you want to run Python 3 the best way is use python3
command.
And if you want to use pip
install a package, I think the correct way is this:
sudo pip install requests # or maybe pip3
If that doesn't work, from the document here is another useage:
sudo python3 -m pip install requests
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.