-
Notifications
You must be signed in to change notification settings - Fork 34
Getting Started
Jinho D. Choi edited this page Jan 12, 2018
·
14 revisions
- Install Python 3.4.x or above.
- Note that Python 2 will not be compatible to the materials in this course.
- Install PyCharm. You can get the professional version by applying for the academic license.
- Lauch PyCharm and create a new project:
- Select
Pure Python
on the left pane. - Choose (or make) a directory called
data-science
. - Choose an interpreter that is
3.4.x
or above. - Click the gear button on the righthand side and select
Create VirtualEnv
. Giveenv
as name and choose thedata-science
directory you just created as location. - Click the
Create
button at the bottom.
- Select
- Install
requests
:- Open the
Preferences
pane from the menu and search forProject Interpreter
. - Click the
+
sign at the bottom of theProject Interpreter
pane. - Search for
requests
and click theInstall Package
button.
- Open the
- Create a python package called
src
. - Create the python file called
getting_started.py
and paste the following code:import requests r = requests.get('http://www.mathcs.emory.edu/~choi') print(r)
- Run the program by clicking
[Run -> Run]
. - If you see the following output on the console, your program runs successfully.
<Response [200]>
- Install Jupyter Notebook.
- On a terminal, go to the
data-science
directory. - Enter the following command to activate the virtualenv:
$ env/bin/activate
- Enter the following command to launch Jupyter Notebook:
(env) $ jupyter notebook
- On the web-browser where it is launched, create a new notebook and followed the steps in getting_started.ipyn.
Copyright © 2018 Emory University - All Rights Reserved.