Installing Python 3

Once Homebrew is set up, install Python 3 by running the following command from a Terminal window:

brew install python3

The installation process will start and may take a few minutes. When it is finished, run the following from the command line:

python3

If the installation is correct, this will print information about the Python interpreter, shown as follows:

Python 3.x.x (default, Apr  4 2017, 09:40:21) 
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.38)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>

You can check that you are indeed running the Python distribution that you installed by checking the version number, indicated by 3.x.x in the preceding sample. You can now exit Python by running the following command at the >>> Python prompt:

quit()

We are going to use the pip3 Python package manager to install the SciPy stack. To check that pip3 was correctly installed, run the following statement from the command line:

pip3 --version

This will print to the Terminal information about the currently installed version of pip, as shown in the following example:

pip 9.0.1 from /home/fmartins/python3/lib/python3.x/site-packages (python 3.x)

Verify that you are indeed running the version of pip3 associated with your installation of Python by checking the version number, indicated by 3.x in the preceding sample output. If no error message is issued, the setup was completed correctly, and you can proceed to install SciPy.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset