Python 我能';由于权限问题,无法下载selenium
我正在尝试安装selenium,但它说我无法安装,因为有权限。顺便说一下,我是在MacOS Mojave 10.14上安装的 我刚刚输入了“brew重新安装selenium server standalone”,然后由于权限原因而失败,您可以在代码部分看到这一点Python 我能';由于权限问题,无法下载selenium,python,bash,selenium-chromedriver,Python,Bash,Selenium Chromedriver,我正在尝试安装selenium,但它说我无法安装,因为有权限。顺便说一下,我是在MacOS Mojave 10.14上安装的 我刚刚输入了“brew重新安装selenium server standalone”,然后由于权限原因而失败,您可以在代码部分看到这一点 ==> Reinstalling selenium-server-standalone ==> Downloading https://selenium-release.storage.googleapis.com/3.1
==> Reinstalling selenium-server-standalone
==> Downloading https://selenium-release.storage.googleapis.com/3.141/selenium-s
Already downloaded: /Users/temirhanzakirov/Library/Caches/Homebrew/downloads/25a539ffe0543bae17e9cc5a70f6f187f973eb016e93696e667c6e4f6bbbf39a--selenium-server-standalone-3.141.59.jar
==> Caveats
To have launchd start selenium-server-standalone now and restart at login:
brew services start selenium-server-standalone
Or, if you don't want/need a background service you can just run:
selenium-server -port 4444
==> Summary
It's suggesting pip install --user selenium
To fix this, the homebrew docs suggest the following:
Note on pip install --user
The normal pip install --user
is disabled
for brewed Python. This is because of a bug in distutils
, because
Homebrew writes a distutils.cfg
which sets the package prefix.
A possible workaround (which puts executable scripts in
~/Library/Python/<X>.<Y>/bin
) is:
python -m pip install --user --install-option="--prefix=" <package-name>
First, run:
brew clean all && brew doctor
==>独立重新安装selenium服务器
==>下载https://selenium-release.storage.googleapis.com/3.141/selenium-s
已下载:/Users/temirhanzakirov/Library/Caches/Homebrew/downloads/25A539FFE05443BAE17E9CC5A70F6F187F973EB016E93696E667C6E4F6BBF39A--selenium-server-standalone-3.141.59.jar
==>注意事项
要立即启动selenium server并在登录时重新启动,请执行以下操作:
brew服务独立启动selenium服务器
或者,如果您不想要/不需要后台服务,您可以运行:
selenium服务器-端口4444
==>摘要
它建议pip安装——用户selenium
要解决此问题,自制文档建议:
关于pip安装--user
的说明正常的pip安装--user
被禁用
煮蟒蛇。这是因为distutils
中有一个bug,因为
自制编写一个设置包前缀的distutils.cfg
一种可能的解决方法(将可执行脚本放入
~/Library/Python//bin
)是:
python-mpip安装--user--install option=“--prefix=“
首先,运行:
brew install python
看起来您使用的是系统Python,而不是自制Python,因此您可以:
并确保$PATH
环境变量中的/usr/local/bin
在/usr/bin
之前。它说在考虑使用--user
选项时,您尝试过吗?太棒了!标记为答案,让大家知道您的问题已在@noname解决