0

Python version 2 OSX

I know that there were other questions like this asked on other posts

but they all said to run pip install selenium which I did and even then I cannot seem to be able to import selenium

When I do pip freeze

It prints selenium==3.141.0 which means that it is on there but I cannot seem to be able to get selenium imported onto Pycharm

Any suggestions?

Devang Padhiyar
  • 3,427
  • 2
  • 22
  • 42
Kritikalken
  • 105
  • 5
  • Do this, in your code write `from selenium import *`, it should get underlined(red line), then click on `selenium` where you have imported it, a red bulb would appear, click on that and install selenium from there – Sushant Mar 06 '19 at 07:10
  • @ThatBird when i click on the bulb the only options were rename reference and convert to import selenium. Should i do import? – Kritikalken Mar 06 '19 at 07:13
  • @ThatBird actually on a different python file i did what you said and i got " Traceback (most recent call last): File "/Applications/PyCharm CE.app/Contents/helpers/packaging_tool.py", line 192, in main retcode = do_install(pkgs) File "/Applications/PyCharm CE.app/Contents/helpers/packaging_tool.py", line 109, in do_install return pip.main(['install'] + pkgs) AttributeError: 'module' object has no attribute 'main'" – Kritikalken Mar 06 '19 at 07:15
  • is the import working when you are not using pycharm – Jeril Mar 06 '19 at 07:18
  • Try upgrading your pip. Then try first step again – Sushant Mar 06 '19 at 07:18
  • @Jeril kinda when i import on terminal it works but not on anaconda – Kritikalken Mar 06 '19 at 07:26
  • @ThatBird when i updated to the latest pycharm and also latest PIP it still doesnt work. any suggestsion? – Kritikalken Mar 06 '19 at 07:28
  • are you using Pycharm or anaconda – Jeril Mar 06 '19 at 09:06
  • PyCharm isn't using the same Python interpreter you installed selenium with – Corey Goldberg Mar 06 '19 at 23:30

0 Answers0