Python: installed selenium package not detected

I am using Anaconda python distribution and would like to use selenium . Unfortunately, selenium is not included in the distribution, so I installed it using the recommended one:

pip install -U selenium 

The FAQ distribution says this should work fine, but when I try to use it, I get python telling me that it knows nothing about this package.

i.e.

 >>> import selenium Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named selenium 

I checked and the /usr/local/lib/python2.7/dist-packages directory has selenium inside it. How do I specify my python distribution so that I can use the package?

+6
source share
3 answers

Following the recommendations of the comment on this question, I installed Selenium using pip installed with the distribution.

 ~/anaconda/bin/pip install -U selenium 

I did not know about this before, but it seems to have worked.

+12
source

Try:

 conda install -c metaperl selenium=2.40.0 
+1
source

The following works for me:

 conda install -c conda-forge selenium 

Learn more about the Selenium page on the Anaconda website .

0
source

Source: https://habr.com/ru/post/987901/


All Articles