簡體   English   中英

如何在Mac上安裝Selenium Python

[英]How to install selenium python on Mac

我已經下載了python的Selenium zip文件,它包含帶有setup.py的文件夾。 它在python.org上說我必須輸入終端“ python setup.py install”,但它給了我這個錯誤,我需要成為管理員,因為我沒有對該目錄的權限,而實際上我的用戶已經是管理員:

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

https://brew.sh/安裝brew

然后安裝python

brew install python3

然后安裝硒

pip3 install selenium

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM