如何在Mac上安装Selenium Python [英] How to install selenium python on Mac
本文介绍了如何在Mac上安装Selenium Python的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经为python下载了Selenium zip文件,它包含带有setup.py的文件夹.它说在python.org上我必须输入终端"python setup.py install",但它给了我这个错误,我需要成为管理员,因为我没有对该目录的权限,而实际上我的用户已经是管理员:
I've downloaded the Selenium zip file for python and it contains the folder with the setup.py. It says on python.org that I have to type in terminal 'python setup.py install' but it gives me this error that I need to be administrator because I have no permission to the directory, when in fact my user is already an administrator:
Checking .pth file support in /Library/Python/2.7/site-packages/
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 13] Permission denied: /Library/Python/2.7/site-packages/test-easy-install-1469.pth'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/Library/Python/2.7/site-packages/
Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.
For information on other options, you may wish to consult the
documentation at:
https://pythonhosted.org/setuptools/easy_install.html
Please make the appropriate changes for your system and try again.`
推荐答案
我不希望接触Mac的默认python.相反,我建议酿造自己的python
I prefer not to touch Mac's default python. Instead I would suggest to brew your own python
从https://brew.sh/
然后安装python
then install python
brew install python3
然后安装硒
pip3 install selenium
这篇关于如何在Mac上安装Selenium Python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文