title: Terminal shows “ImportError: No module named pyperclip"
body: <p>I was writing a code in which the user would run a python program on the Terminal ( I am using OSX ) and the program would copy the username’s password to the clipboard. </p>
  
  <p>Here’s the code:</p>
  
  <pre><code>import sys
  import pyperclip
  
  passwords={'AaruDon':'zxcvbnasdjl@!#@!#4324(3’,’Sandy’:’qjljeqkjleq’} # AaruDon and Sandy are usernames that the user might input in the Terminal
  
  idd=sys.argv[1] # idd would be the username that the user will put in the terminal while he is opening the program
  
  if str(sys.argv[1])in passwords.keys():
    pyperclip.copy(str(passwords[idd]))
  
    print(' The password has been copied to the clipboard')
  
  else:
    print('Sorry. There is no such username.')
  </code></pre>
  
  <p>When I run this program I get:</p>
  
  <blockquote>
    <p>ImportError: No module named pyperclip</p>
  </blockquote>
  
  <p>Believe me, I have imported pyperclip in some  older program before and it did work! I don’t know why is it throwing this error if I try to run this from the Terminal! </p>
  
  <p>How do I get rid of this?</p>
  
  <p>NOTE: Pyperclip is installed. I have checked it before too</p>
  
  <p>EDIT 1) I ran another program in the Terminal which also used pyperclip and it did work! The problem is with this program only</p>