环境变量配置加C:\Python27\Scripts
1.安装pip
下载pip
https://pypi.python.org/pypi/pip#downloads
下载source 类型的包
将pip 解压包到C:\Python27 ,进入cmd ,进入pip此目录,输入命令
python setup.py install
2.安装 setuptools
https://pypi.python.org/pypi/setuptools#downloads
下载source 类型的包
将 解压包到C:\Python27 ,进入cmd ,进入setuptools此目录,输入命令
python setup.py install
3.下载selenium
https://pypi.python.org/pypi/selenium
我下载的是selenium-3.13.0.tar.gz
将解压包放在C:\Python27\Lib\site-packages\selenium-3.13.0
进入cmd ,进入setuptools此目录,输入命令setup.py install
另一种方法:
cmd开启控制台,cd命令进入:Python2\Scripts,输入pip install selenium 或者 pip install –U selenium后回车,等待下载并安装,如果无错误 即安装成功。
说明:如果网络被墙或者非连网状态,那么上述安装无效,必须手动安装。
建议先装selenium ,再装Jetbrain , 我遇到了问题 如下
C:\Python27\lib\site-packages\pip-18.0-py2.7.egg\pip\_vendor\urllib3\util\ssl_.py:160: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecurePlatformWarning
卸载了Jetbrain ,在装就没有报错了
这篇博客详细介绍了如何在Python环境中手动安装selenium。首先,通过下载pip和setuptools的源代码包并使用python setup.py install命令进行安装。接着,下载selenium的tar.gz文件,解压后放置于特定目录,并运行setup.py install。另外,提到了使用pip install selenium的命令行方式,但警告在网络不稳定时可能需要手动安装。最后,作者遇到了与Jetbrain冲突的问题,卸载Jetbrain后解决了安装错误。
15万+

被折叠的 条评论
为什么被折叠?



