title: Using PIP to install openpyxl for a user
body: <p>I've written a script that will enable a user to have their weekly timesheet's filled out automatically and save it as a new excel spreadsheet. </p>
  
  <p>I thought I would be able to just have the Openpyxl folder in the same directory as the script for it to import but it does not seem to work. </p>
  
  <p>I have put together a bit of code based off a few other threads below to check for openpyxl before it imports. So I can hopefully have the ability to setup openpyxl. I intend to have this bit of code run during the import of the os, sys, time, datetime etc.</p>
  
  <pre><code>try:
      __import__('imp').find_module('openpyx')
      print('this worked')
  except ImportError:
      pass
      print('')
      print('You do not have OpenpyXl installed - it will now install')
      print('')
  </code></pre>
  
  <p>I understand I should be using PIP ? So if I have the Openpyxl folder in the same directory as the script how can I point too it ? 
  Would I need to change the sys path ?</p>
  
  <p>This is how my code essentially starts out - </p>
  
  <pre><code>#!/usr/bin/env python3
  import os
  import sys
  import openpyxl
  import time
  from datetime import datetime
  from datetime import timedelta
  
  FMT = '%H:%M'
  
  print("")
  print("Welcome to Timesheet Bot 1.0")
  print ('\033[91m' + "I now will ask you a few questions about your work week." + '\033[0m')
  time.sleep(3)
  
  # Location of spreadsheet
  
  file = str(input('Please drag and drop the spreadsheet here : '))
  path = file
  os.chdir(path)
  wb = openpyxl.load_workbook('DC.xlsx')
  FMT = '%H:%M'
  sheet = wb['TIMESHEET']
  
  # Name of the individual
  print("")
  name = str(input('What is your full name? '))
  sheet['B9'] = name
  </code></pre>
  
  <p>Im still learning as I go so appreciate any guidance or reading that I should do to learn it. </p>