Database Reference
In-Depth Information
Step 3: Download and Start the Data Science Toolbox
Open a terminal (known as the Command Prompt or PowerShell in Microsoft Win‐
dows). Create a directory, e.g.,
MyDataScienceToolbox
, and navigate to it by typing:
$
mkdir MyDataScienceToolbox
$
cd
MyDataScienceToolbox
In order to initialize the Data Science Toolbox, run the following command:
$
vagrant init data-science-toolbox/data-science-at-the-command-line
This creates a file named
Vagrantile
. This is a configuration file that tells Vagrant
how to launch the virtual machine. This file contains a lot of lines that are commen‐
ted out. A minimal version is shown in
Example 2-1
.
Example 2-1. Minimal coniguration for Vagrant
Vagrant
.
configure
(
2
)
do
|
config
|
config
.
vm
.
box
=
"data-science-toolbox/data-science-at-the-command-line"
end
By running the following command, the Data Science Toolbox will be downloaded
and booted:
$
vagrant up
If everything went well, then you now have a Data Science Toolbox running on your
local machine.
If you ever see the message
default: Warning: Connection time
out. Retrying...
printed repeatedly, then it may be that the vir‐
tual machine is waiting for input. This may happen when the vir‐
tual machine has not been properly shut down. In order to find out
what's wrong, add the following lines to
Vagrantile
before the last
end
statement (also see
Example 2-2
):
config
.
vm
.
provider
"virtualbox"
do
|
vb
|
vb
.
gui
=
true
end
This will cause VirtualBox to show a screen. Once the virtual
machine has booted and you have identified the problem, you can
remove these lines from
Vagrantile
. The username and password
to log in are both
vagrant
. If this doesn't help, we advise you to
check
the topic's website
, as this website contains an up-to-date list
of frequently asked questions.
Example 2-2
shows a slightly more elaborate
Vagrantile
. You can view more configu‐
ration options at
http://docs.vagrantup.com
.