0

Im trying to install selenium on python 3.6.

With command

pip install selenium

i got this error :

Using cached https://files.pythonhosted.org/packages/80/d6/4294f0b4bce4de0abf13e17190289f9d0613b0a44e5dd6a7f5ca98459853/selenium-3.141.0-py2.py3-none-any.whl Requirement already satisfied: urllib3 in /usr/lib/python3/dist-packages (from selenium) (1.22) Installing collected packages: selenium Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/lib/python3.6/dist-packages/selenium-3.141.0.dist-info' Consider using the --user option or check the permissions.

I saw people getting similar mistakes, but the solutions did not help me. Thanks in advance.

2 Answers2

0

use --user at last of your install command, so that the package will be installed only for the current user, not for all.

sudo pip install xxxxxx --user

If that solution did not change your issue please type following code to terminal and try to run pip install selenium after that.It is directly related with read/write access to that directory.

sudo chown -R username /usr/local/lib/python3.6/

sayhan
  • 1,168
  • 1
  • 16
  • 22
0

try with

> sudo pip install -U selenium
Infern0
  • 2,565
  • 1
  • 8
  • 21