I'm new to python but not programming, so please bear with me..
I am attempting to write a python script that utilizes the win32com.client module but am running into a strange occurrence. If I initialize the python shell in the command prompt and manually type in import win32com.client
, the command processes just fine and I can use the module with no issues.
However, if i code that import line into the .py file and try to run the file through the command prompt (just by typing foo.py) it tells me that the win32com
module cannot be found.. I have the python27 directory path included in my environment variables as well as my PythonProjects path.
Example Follows:
import win32com.client
def foo(): <CODE HERE>
Upon execution:
File C:\PythonProjects\Foo.py, line 1, in import win32com.client ModuleNotFoundError: No module named 'win32com'
Thank you in advance for any/all help.