- install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Jump if already installed. It’s necessary to update your homebrew to the latest version.
2. Use Homebrew install Python3 & pip3 (pip is a package management tool for Python), automatically latest version, you may choose another version.
$ brew install python3
We use pip3 because we want to use Python 3.x.x.
3. If you need pip simply, try
$ sudo easy_install pip
install pip need administrator role
4. Check the version
$python --version
$python3 --version
$pip --version
$pip3 --version
- Install PyCharm. I recommend community edition. If you want the professional edition, there is a Free JetBrains Products License Server.
Install additional packages:
For example, bs4 (BeautifulSoup 4):- PyCharm offer you an inner package management tool:
Preferences –> Project –> Project Interpreter
- Click “+” to install packages you need.
- Usually there are some errors, follow its introduction and try again.
- At most cases, error occurs when you revoke the administrator role.
So…sudo
please
Another way is to install in the terminal:
$ pip3 install bs4
- if any problems, follow the introduction and try again.
- Usually you need to upgrade your “pip” “homebrew” “python” or other relative package.
- PyCharm offer you an inner package management tool: