Git Product home page Git Product logo

install's Introduction

Installation

Part 1. Operating System

You can be a data scientist on any operating system. In general, most professionals choose a UNIX-type OS; typically Apple's OS X or a popular Linux distribution, such as Ubuntu. If you're already using Mac or Linux, great! Skip ahead to Part 2 and get started with your installs.

However, there is a growing need for (and interest in) data science in industries that traditionally use PCs. If you're on a Windows machine, that's ok too! You'll just need to install an additional piece of software to provide a development environment similar to OS X and Linux.

Click here to download the Git Bash shell. This will allow you to emulate most of the common commands and functions native to OS and Linux systems.

Terminal

Mac

  • Open a terminal by hitting the apple key + spacebar, and typing 'terminal' in the spotlight search. Open the Terminal application.
  • Type git --version in the terminal and hit enter
  • The returned version of git should be a major version of 2.x.x or greater, for example:
[person@computer]$ git --version
git version 2.17.1

Windows

Windows has no native git or terminal support. To achieve equivalent functionality, a program named GitBash must be downloaded from here.

  1. Open the installation executable and accept the default directory.

  2. Check for updates daily.

  3. Use vim as the default text editor.

  4. This should be 'Use Git from Git Bash only' Needs changed.

  5. Change to 'Checkout as-is, commit Unix-style line endings.'

  6. Uncheck the two boxes and click finish.

  7. Open git bash via the desktop or start menu icons.

Base Python Installation

Windows (Mac & Linux similar)

  1. First, head over to python.org. Click on the latest release for Python 3 (do not use Python 2!!).

  2. That will bring you to this page. Click on the Windows x86-64 executable installer link.

  3. Select a location to save the file to. Here, I've saved the file to my desktop. If you'd like to verify that the file downloaded correctly, you can run an md5 checksum on the file by using md5sum.exe (this comes bundled with gitbash) and verify the returned string (here shown ending in `be3e`) matches the checksum displayed on the webpage.

  4. Run the installer by double clicking on it. Uncheck 'Add Python 3.x to PATH'. Click on 'Customize installation'.

  5. Check 'Add Python to environment variables'. This is very important!!! Your install location should be :\Users\\AppData\Local\Programs\Python\Python37.

  6. Your installation should display the below screen if successful. You do not need to disable path length limit.

  7. Run which python to verify the installation location (it should be in :/Users//AppData/Local/Programs/Python/Python37/python). Verify your python version is 3.x.x with python -V. Verify your pip package manager is installed with pip -V. Don't worry about the version of pip - we'll update it in the next step.

  8. Update your pip version to the latest one with python -m pip install --upgrade pip

  9. Install virtualenvwrapper, an environment manager for python, by typing pip install virtualenvwrapper

  10. Upon completion, you need to add a few lines to your ~/.bash_profile file. This will set environment variables and paths for the virtualenvwrapper tool.

  11. When opened, insert the following code block. Press i to enter insert mode before pasting the text below. When finished, press Esc followed by wq. Press Enter to write the changes to file. export WORKON_HOME=$HOME/.virtualenvs export PROJECT_HOME=$HOME/Devel source ~/AppData/Local/Programs/Python/Python37/Scripts/virtualenvwrapper.sh

  12. When finished, type source ~/.bash_profile to deploy the above changes. You may see some output on your terminal screen for the environment variables and directories being created. This is normal and a one-time occurrence.
  13. Type mkvirtualenv . The envrironment name can be anything you'd like. Here, we're using an environment named utc.

  14. Now comes the big installation! Be sure you have activated your environment. It will display () above your terminal. Notice how we have (utc) above our terminal prompt here, denoting we are in the utc virtual environment. pip install jupyter pandas matplotlib seaborn requests openpyxl pytime pdfminer.six PyPDF4

  15. It make take a few minutes to install everything. When finished, you should have a screen that looks like this. Run echo $? at the prompt. If the returned value is 0, you have successfully installed all your packages!

  16. Now start your jupyter notebook! Type in jupyter notebook in your terminal. You should see the following window automatically pop up in your system's default browser.


  17. Open a new notebook by clicking on New -> Python 3. Make sure it says 'Python 3' and not 'Python 2'.

  18. Finally, test all the dependent libraries and python version using the following code.
          import pandas as pd
          import matplotlib
          import seaborn
          import requests
          import openpyxl
          import pytime
          import pdfminer
          import PyPDF4
          !python -V
        

    The returned results should be <code>Python 3.x.x</code> with no errors (no text in red).
    </details>
    

Part 2. Git Configuration

  1. To check if your Git installation was successful, open a new terminal window and try to run Git from the command line:
$ git --version

The output should be something like this:

$ git --version
git version 2.5.0
  1. Make sure you've registered yourself for a github account first. Once you get your email and username set up, do the following locally on your machine:
$ git config --global user.name "Your Name"
$ git config --global user.email [email protected]

These identifiers will be added to your commits and show up when you push your changes to GitHub from the command line!

Optional: Set Up SSH for Easier Remote Connection

While you can connect your local repositories (the work on your laptop) to remote repositories (those stored on GitHub) without much additional effort, this will prompt you to input your username and password quite frequently. However, there's an alternative known as SSH, which will let you create a file on your computer that will authenticate you to GitHub without entering your username and password over and over again.

Note: Remember, these steps are optional. If you're having trouble, feel free to chat w your instructor!

Using SSH and SSH Agent (Recommended)

You can use these guides to get started:

What is Secure Shell (SSH)?

SSH, or Secure SHell, is a common means of adding an additional layer of security to a connection. It establishes authenticity between a client and a server. This can be useful for secure file sharing and remote application access.

How SSH Works

There are a couple of steps to the high-level SSH process:

  • A client makes a request to the server.
  • A server responds by asking for authentication.
  • A client provides authentication.
  • If authentication is correct, a connection is established.

install's People

Contributors

ggodreau avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.