No module named "selenium/googletrans/tabula" when running script through cmd but works fine on idle?

时间:2018-06-04 17:11:13

标签: python selenium cmd python-idle

I have a list of python scripts which run perfectly fine through idle. However, when I run it through cmd I get various errors stating

No module named 'selenium', ,No module named 'googletrans' ,No module named 'tabula'

When I use pip install it says. 'Requirement already satisfied'

Also when I check pip list the above mentioned modules are there.

sys.path

In cmd

['', 'C:\Users\jay.haran\Documents\PC_scrape\Scraper', 'C:\Users\jay.haran\ C:\Users\jay.haran\AppData\Local\Programs\Python\Python36-32\Lib\idlelib', 'C:\Users\jay.haran\AppData\Local\Programs\Python\Python36-32\python36.zip', 'C:\Users\jay.haran\AppData\Local\Programs\Python\Python36-32\DLLs', 'C:\Users\jay.haran\AppData\Local\Programs\Python\Python36-32\lib', 'C:\Users\jay.haran\AppData\Local\Programs\Python\Python36-32', 'C:\Users\jay.haran\AppData\Local\Programs\Python\Python36-32\lib\site-packages']

'I added the second and third item in the list

In idle

['C:\Users\jay.haran\Documents\PC_scrape\Scraper', 'C:\Users\jay.haran\Documents\PC_scrape\Scraper', 'C:\Users\jay.haran\Documents\PC_scrape\Scraper\ C:\Users\jay.haran\AppData\Local\Programs\Python\Python36-32\Lib\idlelib', 'C:\Users\jay.haran\AppData\Local\Programs\Python\Python36-32\python36.zip', 'C:\Users\jay.haran\AppData\Local\Programs\Python\Python36-32\DLLs', 'C:\Users\jay.haran\AppData\Local\Programs\Python\Python36-32\lib', 'C:\Users\jay.haran\AppData\Local\Programs\Python\Python36-32', 'C:\Users\jay.haran\AppData\Local\Programs\Python\Python36-32\lib\site-packages']

sys.version In both

In cmd and In idle = 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 16:07:46) [MSC v.1900 32 bit (Intel)]

sys.executable

In cmd = C:\Users\jay.haran\AppData\Local\Programs\Python\Python36-32\python.exe

In idle = C:\Users\jay.haran\AppData\Local\Programs\Python\Python36-32\pythonw.exe

There are other modules installed such as bs4, xlrd, pandas that aren't causing any issues.

Thank you very much for any help.

0 个答案:

没有答案