I noticed a problem with python (windows). If I create a program (even simple) and I import a package, it works if I run it from the python shell
but if I run it from the .py
file or with the cmd (C:\Python34\program.py)
it doesn't.
Make it clear:
Program 1
from selenium import webdriver
print("have a good day")
Program2
import pyautogui
print("be happy")
pyautogui.moveT(300,300)
Error program 1
Traceback (most recent calls)
File"C:\Python34\program.py" line 1, in <module>
from selenium import webdriver
ModuleNotFoundError: No module named 'selenium'
Error Program 2
Traceback (most recent calls)
File"C:\Python34\program.py" line 1, in <module>
import pyautogui
ModuleNotFoundError: No module named 'pyautogui'
So I don't understand why it doesn't find/recognize the module if I doesn't run it from the shell.