Pip is correctly installing libraries to the proper directory, but I cannot import those packages properly in program
SOLVED. So when I did:
import sys
sys.path.append(path to pandas library) 
it worked! so now I can fully use pandas. I guess I will just have to do this anytime I download a new library and it doesn't work. Thank you for all the help
I installed (with pip) MatPlotLib and Pandas, and they are both not working properly in programs. Here is the strange thing... 
When I type the following into the interactive environment of IDLE
import pandas as pd
pd.Series([1, 2, 3, 4, 5])
I get this as output: (indicating that it works properly)
0    1
1    2
2    3
3    4
4    5
dtype: int64
But when I use that very same code in a python program, it crashes and says "AttributeError: module 'pandas' has no attribute 'Series'" 
Can anyone tell me what's going on?
I can also successfully import matplotlib in the interactive environment but get errors when I do it in a program and run it.
EDIT: There is no shebang because I am running the program through IDLE. I am using python 3.6, the only python I have on my computer. I am executing this file by clicking run in IDLE.
Currently In my command prompt paths I have 
C:\Users\Karl\AppData\Local\Programs\Python\Python36
C:\Users\Karl\AppData\Local\Programs\Python\Python36\Scripts\
EDIT 2: I think we are closer to finding out the problem. If I run a python program with the code above in the command line (this time with the proper shebang(I forgot one before)), it works! So this must be an idle issue. 
Currently, one of IDLE's paths is to 
C:\Users\Karl\AppData\Local\Programs\Python\Python36\lib\site-packages
which contains all of the libraries for python.
EDIT FINAL: SOLVED. So when I did:
import sys
sys.path.append(path to pandas library) it worked! so now I can fully use pandas. I guess I will just have to do this anytime I download a new library and it doesn't work. Thank you for all the help