Upgrade to Python 3.x
Nov 21, 2016. Global Nav Open Menu Global Nav Close Menu; Apple; Shopping Bag +. Search Support.
Download and install Python
3.x
. For this tutorial I have used 3.5
.Once you downloaded and run the installation app, Python 3 will be installed under:
The installer also adds the path for the above to your default path in
.bash_profile
so that when you type:on the command line, the system can find it. You'll know you've been successful if you see the Python interpreter launch.
Install pip
Fire up your Terminal and type:
Install PySpark on Mac
- Go to the Spark downloads page and choose a Spark release. For this tutorial I chose
spark-2.0.1-bin-hadoop2.7
. - Choose a package type. For this tutorial I have choses
Pre-built for Hadoop 2.7 and later
. - Choose a download type: (Direct Download)
- Download Spark: spark-2.0.1-bin-hadoop2.7.tgz
- Unzip the folder in your home directory using the following command. tar -zxvf spark-2.0.1-bin-hadoop2.7.tgz. I prefer create an
opt
directory in my home directory and then unzip it under~/opt/
.
Next, we will edit our
.bash_profile
so we can open a spark notebook in any directory. So fire up your Terminal and type in:my
.bash_profile
looks as follows:The relevant stuff is:
The
PYSPARK_DRIVER_PYTHON
parameter and the PYSPARK_DRIVER_PYTHON_OPTS
parameter are used to launch the PySpark shell in Jupyter Notebook. The --master
parameter is used for setting the master node address. Here we launch Spark locally on 2 cores for local testing.Install Jupyter Notebook with pip
First, ensure that you have the latest pip; older versions may have trouble with some dependencies:
Then install the Jupyter Notebook using:
Thats it!
You can now run:
in the command line. A browser window should open with Jupyter Notebook running under http://localhost:8888/
Configure Jupyter Notebook to show line numbers
Run
to get the Jupyter config directory. Mine is located under
/Users/lucas/.jupyter
.Run:Run:
to create a
custom
directory (if does not already exist).Run:Run:
and add:
You could add any javascript. It will be executed by the ipython notebook at load time.
Install a Java 9 Kernel
Install Java 9. Java home is then:
Install kulla.jar. I have installed it under
~/opt/
.Download the kernel. Again, I placed the entire
javakernel
directory under ~/opt/
.This kernel expects two environment variables defined, which can be set in the kernel.json (described below):
So go ahead and edit
kernel.json
in the kernel you have just download to look as follows:Run:
Run:
Backup software mac free. Run:
to copy the edited
kernel.json
into the newly created java
directory.Install
gnureadline
by running:in the commoand line.
If all worked you should be able to run the kernel:
and see the following output:
You can get macOS PostgreSQL packages from several different sources.
Interactive installer by EDB
Download the installercertified by EDB for all supported PostgreSQL versions.
This installer includes the PostgreSQL server, pgAdmin; a graphical tool for managing and developingyour databases, and StackBuilder; a package manager that can be used to download and installadditional PostgreSQL tools and drivers. Stackbuilder includes management,integration, migration, replication, geospatial, connectors and other tools.
This installer can run in graphical, command line, or silent install modes.
The installer is designed to be a straightforward, fast way to get up and running withPostgreSQL on macOS.
Advanced users can also download azip archiveof the binaries, without the installer.This download is intended for users who wish to include PostgreSQL as part of another application installer.
Platform support
The installers are tested by EDB on the following platforms. They will generally work on newer versions of macOS as well:
PostgreSQL Version | 64-bit macOS Platforms |
---|---|
13 | 10.13 - 10.15 |
12 | 10.12 - 10.14 |
11 | 10.12 - 10.14 |
10 | 10.10 - 10.12 |
9.6 | 10.10 - 10.12 |
9.5 | 10.8 - 10.10 |
Postgres.app
Postgres.app is a simple, native macOS app that runs in the menubar without the need of an installer. Open the app, and you have a PostgreSQL serverready and awaiting new connections. Close the app, and the server shuts down.
Homebrew
PostgreSQL can also be installed on macOSusing Homebrew. Please see the Homebrewdocumentation for information on how to install packages.
A listof PostgreSQLpackages can be found using the Braumeister search tool.
MacPorts
PostgreSQL packages are also available for macOS from theMacPorts Project. Please see theMacPorts documentation for information on how to install ports.
Install Pip Os X
A list ofPostgreSQL packagescan be found using the portfiles search tool on the MacPorts website.
Fink
Mac Os Pip Not Found
PostgreSQL packages are available for macOS from theFink Project.Please see the Fink documentation for information on how to install packages.
Mac Os Pip
A list ofPostgreSQL packagescan be found using the package search tool on the Fink website.