selenium python_selenium+python自动化

安装具体执行过程命令如下

Last login: Thu Apr2 22:19:42 on console

192:~ july$ pip3 install selenium

-bash: pip3: command not found

192:~ july$ pip --version

-bash: pip: command not found

192:~ july$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

% Total% Received % XferdAverage Speed TimeTime TimeCurrent

DloadUpload Total SpentLeftSpeed

100 1764k100 1764k0 02840400:01:030:01:03 --:--:-- 33576

192:~ july$ python get-pip.py

DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support

Defaulting to user installation because normal site-packages is not writeable

Collecting pip

Downloading pip-20.0.2-py2.py3-none-any.whl (1.4 MB)

|███████████▏| 501 kB 3.3 kB/s eta 0:04:45ERROR: Exception:

Traceback (most recent call last):

File "/var/folders/m8/73y0wl11063c5_fycvm_85hw0000gn/T/tmpxP5i4M/pip.zip/pip/_internal/cli/base_command.py", line 186, in _main

status = self.run(options, args)

File "/var/folders/m8/73y0wl11063c5_fycvm_85hw0000gn/T/tmpxP5i4M/pip.zip/pip/_internal/commands/install.py", line 331, in run

resolver.resolve(requirement_set)

File "/var/folders/m8/73y0wl11063c5_fycvm_85hw0000gn/T/tmpxP5i4M/pip.zip/pip/_internal/legacy_resolve.py", line 177, in resolve

discovered_reqs.extend(self._resolve_one(requirement_set, req))

File "/var/folders/m8/73y0wl11063c5_fycvm_85hw0000gn/T/tmpxP5i4M/pip.zip/pip/_internal/legacy_resolve.py", line 333, in _resolve_one

abstract_dist = self._get_abstract_dist_for(req_to_install)

File "/var/folders/m8/73y0wl11063c5_fycvm_85hw0000gn/T/tmpxP5i4M/pip.zip/pip/_internal/legacy_resolve.py", line 282, in _get_abstract_dist_for

abstract_dist = self.preparer.prepare_linked_requirement(req)

File "/var/folders/m8/73y0wl11063c5_fycvm_85hw0000gn/T/tmpxP5i4M/pip.zip/pip/_internal/operations/prepare.py", line 482, in prepare_linked_requirement

hashes=hashes,

File "/var/folders/m8/73y0wl11063c5_fycvm_85hw0000gn/T/tmpxP5i4M/pip.zip/pip/_internal/operations/prepare.py", line 287, in unpack_url

hashes=hashes,

File "/var/folders/m8/73y0wl11063c5_fycvm_85hw0000gn/T/tmpxP5i4M/pip.zip/pip/_internal/operations/prepare.py", line 159, in unpack_http_url

link, downloader, temp_dir.path, hashes

File "/var/folders/m8/73y0wl11063c5_fycvm_85hw0000gn/T/tmpxP5i4M/pip.zip/pip/_internal/operations/prepare.py", line 303, in _download_http_url

for chunk in download.chunks:

File "/var/folders/m8/73y0wl11063c5_fycvm_85hw0000gn/T/tmpxP5i4M/pip.zip/pip/_internal/utils/ui.py", line 160, in iter

for x in it:

File "/var/folders/m8/73y0wl11063c5_fycvm_85hw0000gn/T/tmpxP5i4M/pip.zip/pip/_internal/network/utils.py", line 39, in response_chunks

decode_content=False,

File "/var/folders/m8/73y0wl11063c5_fycvm_85hw0000gn/T/tmpxP5i4M/pip.zip/pip/_vendor/urllib3/response.py", line 564, in stream

data = self.read(amt=amt, decode_content=decode_content)

File "/var/folders/m8/73y0wl11063c5_fycvm_85hw0000gn/T/tmpxP5i4M/pip.zip/pip/_vendor/urllib3/response.py", line 529, in read

raise IncompleteRead(self._fp_bytes_read, self.length_remaining)

File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py", line 35, in __exit__

self.gen.throw(type, value, traceback)

File "/var/folders/m8/73y0wl11063c5_fycvm_85hw0000gn/T/tmpxP5i4M/pip.zip/pip/_vendor/urllib3/response.py", line 439, in _error_catcher

raise ReadTimeoutError(self._pool, None, "Read timed out.")

ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.

192:~ july$ python get-pip.pypip install -U pippip install -U pi

python: can't open file 'get-pip.pypip': [Errno 2] No such file or directory

192:~ july$ pip install -U pip

-bash: pip: command not found

192:~ july$ python get-pip.py

DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support

Defaulting to user installation because normal site-packages is not writeable

Collecting pip

Downloading pip-20.0.2-py2.py3-none-any.whl (1.4 MB)

|█████████████████████▋| 972 kB 2.7 kB/s eta 0:02:53ERROR: Exception:

Traceback (most recent call last):

File "/var/folders/m8/73y0wl11063c5_fycvm_85hw0000gn/T/tmpNbmzZ4/pip.zip/pip/_internal/cli/base_command.py", line 186, in _main

status = self.run(options, args)

File "/var/folders/m8/73y0wl11063c5_fycvm_85hw0000gn/T/tmpNbmzZ4/pip.zip/pip/_internal/commands/install.py", line 331, in run

resolver.resolve(requirement_set)

File "/var/folders/m8/73y0wl11063c5_fycvm_85hw0000gn/T/tmpNbmzZ4/pip.zip/pip/_internal/legacy_resolve.py", line 177, in resolve

discovered_reqs.extend(self._resolve_one(requirement_set, req))

File "/var/folders/m8/73y0wl11063c5_fycvm_85hw0000gn/T/tmpNbmzZ4/pip.zip/pip/_internal/legacy_resolve.py", line 333, in _resolve_one

abstract_dist = self._get_abstract_dist_for(req_to_install)

File "/var/folders/m8/73y0wl11063c5_fycvm_85hw0000gn/T/tmpNbmzZ4/pip.zip/pip/_internal/legacy_resolve.py", line 282, in _get_abstract_dist_for

abstract_dist = self.preparer.prepare_linked_requirement(req)

File "/var/folders/m8/73y0wl11063c5_fycvm_85hw0000gn/T/tmpNbmzZ4/pip.zip/pip/_internal/operations/prepare.py", line 482, in prepare_linked_requirement

hashes=hashes,

File "/var/folders/m8/73y0wl11063c5_fycvm_85hw0000gn/T/tmpNbmzZ4/pip.zip/pip/_internal/operations/prepare.py", line 287, in unpack_url

hashes=hashes,

File "/var/folders/m8/73y0wl11063c5_fycvm_85hw0000gn/T/tmpNbmzZ4/pip.zip/pip/_internal/operations/prepare.py", line 159, in unpack_http_url

link, downloader, temp_dir.path, hashes

File "/var/folders/m8/73y0wl11063c5_fycvm_85hw0000gn/T/tmpNbmzZ4/pip.zip/pip/_internal/operations/prepare.py", line 303, in _download_http_url

for chunk in download.chunks:

File "/var/folders/m8/73y0wl11063c5_fycvm_85hw0000gn/T/tmpNbmzZ4/pip.zip/pip/_internal/utils/ui.py", line 160, in iter

for x in it:

File "/var/folders/m8/73y0wl11063c5_fycvm_85hw0000gn/T/tmpNbmzZ4/pip.zip/pip/_internal/network/utils.py", line 39, in response_chunks

decode_content=False,

File "/var/folders/m8/73y0wl11063c5_fycvm_85hw0000gn/T/tmpNbmzZ4/pip.zip/pip/_vendor/urllib3/response.py", line 564, in stream

data = self.read(amt=amt, decode_content=decode_content)

File "/var/folders/m8/73y0wl11063c5_fycvm_85hw0000gn/T/tmpNbmzZ4/pip.zip/pip/_vendor/urllib3/response.py", line 529, in read

raise IncompleteRead(self._fp_bytes_read, self.length_remaining)

File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py", line 35, in __exit__

self.gen.throw(type, value, traceback)

File "/var/folders/m8/73y0wl11063c5_fycvm_85hw0000gn/T/tmpNbmzZ4/pip.zip/pip/_vendor/urllib3/response.py", line 439, in _error_catcher

raise ReadTimeoutError(self._pool, None, "Read timed out.")

ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.

192:~ july$ python get-pip.py

DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support

Defaulting to user installation because normal site-packages is not writeable

Collecting pip

Downloading pip-20.0.2-py2.py3-none-any.whl (1.4 MB)

|████████████████████████████████| 1.4 MB 30 kB/s

Collecting wheel

Downloading wheel-0.34.2-py2.py3-none-any.whl (26 kB)

Installing collected packages: pip, wheel

WARNING: The scripts pip, pip2 and pip2.7 are installed in '/Users/july/Library/Python/2.7/bin' which is not on PATH.

Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

WARNING: The script wheel is installed in '/Users/july/Library/Python/2.7/bin' which is not on PATH.

Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

Successfully installed pip-20.0.2 wheel-0.34.2

192:~ july$ pip3 install selenium

-bash: pip3: command not found

192:~ july$ pip install selenium

-bash: pip: command not found

192:~ july$ pip2 install selenium

-bash: pip2: command not found

192:~ july$ pip --version

-bash: pip: command not found

192:~ july$ pip --version

-bash: pip: command not found

192:~ july$ python2 get-pip.py

-bash: python2: command not found

192:~ july$ python3 get-pip.py

-bash: python3: command not found

192:~ july$ pip install selenium

-bash: pip: command not found

192:~ july$ pip show

-bash: pip: command not found

192:~ july$ pip install pip

-bash: pip: command not found

192:~ july$

192:~ july$ install python-pip

usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]

[-o owner] file1 file2

install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]

[-o owner] file1 ... fileN directory

install -d [-v] [-g group] [-m mode] [-o owner] directory ...

192:~ july$ sudo easy_install pip

Password:

Searching for pip

Best match: pip 20.0.2

Adding pip 20.0.2 to easy-install.pth file

Installing pip script to /usr/local/bin

Installing pip3.8 script to /usr/local/bin

Installing pip3 script to /usr/local/bin

Using /Users/july/Library/Python/2.7/lib/python/site-packages

Processing dependencies for pip

Finished processing dependencies for pip

192:~ july$ pip show

DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support

WARNING: ERROR: Please provide a package name or names.

192:~ july$ pip --version

pip 20.0.2 from /Users/july/Library/Python/2.7/lib/python/site-packages/pip (python 2.7)

192:~ july$ pip install selenium

DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support

Defaulting to user installation because normal site-packages is not writeable

Collecting selenium

Downloading selenium-3.141.0-py2.py3-none-any.whl (904 kB)

|█████ | 143 kB 2.1 kB/s eta 0:06:03ERROR: Exception:

Traceback (most recent call last):

File "/Users/july/Library/Python/2.7/lib/python/site-packages/pip/_internal/cli/base_command.py", line 186, in _main

status = self.run(options, args)

File "/Users/july/Library/Python/2.7/lib/python/site-packages/pip/_internal/commands/install.py", line 331, in run

resolver.resolve(requirement_set)

File "/Users/july/Library/Python/2.7/lib/python/site-packages/pip/_internal/legacy_resolve.py", line 177, in resolve

discovered_reqs.extend(self._resolve_one(requirement_set, req))

File "/Users/july/Library/Python/2.7/lib/python/site-packages/pip/_internal/legacy_resolve.py", line 333, in _resolve_one

abstract_dist = self._get_abstract_dist_for(req_to_install)

File "/Users/july/Library/Python/2.7/lib/python/site-packages/pip/_internal/legacy_resolve.py", line 282, in _get_abstract_dist_for

abstract_dist = self.preparer.prepare_linked_requirement(req)

File "/Users/july/Library/Python/2.7/lib/python/site-packages/pip/_internal/operations/prepare.py", line 482, in prepare_linked_requirement

hashes=hashes,

File "/Users/july/Library/Python/2.7/lib/python/site-packages/pip/_internal/operations/prepare.py", line 287, in unpack_url

hashes=hashes,

File "/Users/july/Library/Python/2.7/lib/python/site-packages/pip/_internal/operations/prepare.py", line 159, in unpack_http_url

link, downloader, temp_dir.path, hashes

File "/Users/july/Library/Python/2.7/lib/python/site-packages/pip/_internal/operations/prepare.py", line 303, in _download_http_url

for chunk in download.chunks:

File "/Users/july/Library/Python/2.7/lib/python/site-packages/pip/_internal/utils/ui.py", line 160, in iter

for x in it:

File "/Users/july/Library/Python/2.7/lib/python/site-packages/pip/_internal/network/utils.py", line 39, in response_chunks

decode_content=False,

File "/Users/july/Library/Python/2.7/lib/python/site-packages/pip/_vendor/urllib3/response.py", line 564, in stream

data = self.read(amt=amt, decode_content=decode_content)

File "/Users/july/Library/Python/2.7/lib/python/site-packages/pip/_vendor/urllib3/response.py", line 529, in read

raise IncompleteRead(self._fp_bytes_read, self.length_remaining)

File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py", line 35, in __exit__

self.gen.throw(type, value, traceback)

File "/Users/july/Library/Python/2.7/lib/python/site-packages/pip/_vendor/urllib3/response.py", line 439, in _error_catcher

raise ReadTimeoutError(self._pool, None, "Read timed out.")

ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.

192:~ july$ pip install selenium

DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support

Defaulting to user installation because normal site-packages is not writeable

Collecting selenium

Downloading selenium-3.141.0-py2.py3-none-any.whl (904 kB)

|████████████████| 450 kB 2.1 kB/s eta 0:03:36ERROR: Exception:

Traceback (most recent call last):

File "/Users/july/Library/Python/2.7/lib/python/site-packages/pip/_internal/cli/base_command.py", line 186, in _main

status = self.run(options, args)

File "/Users/july/Library/Python/2.7/lib/python/site-packages/pip/_internal/commands/install.py", line 331, in run

resolver.resolve(requirement_set)

File "/Users/july/Library/Python/2.7/lib/python/site-packages/pip/_internal/legacy_resolve.py", line 177, in resolve

discovered_reqs.extend(self._resolve_one(requirement_set, req))

File "/Users/july/Library/Python/2.7/lib/python/site-packages/pip/_internal/legacy_resolve.py", line 333, in _resolve_one

abstract_dist = self._get_abstract_dist_for(req_to_install)

File "/Users/july/Library/Python/2.7/lib/python/site-packages/pip/_internal/legacy_resolve.py", line 282, in _get_abstract_dist_for

abstract_dist = self.preparer.prepare_linked_requirement(req)

File "/Users/july/Library/Python/2.7/lib/python/site-packages/pip/_internal/operations/prepare.py", line 482, in prepare_linked_requirement

hashes=hashes,

File "/Users/july/Library/Python/2.7/lib/python/site-packages/pip/_internal/operations/prepare.py", line 287, in unpack_url

hashes=hashes,

File "/Users/july/Library/Python/2.7/lib/python/site-packages/pip/_internal/operations/prepare.py", line 159, in unpack_http_url

link, downloader, temp_dir.path, hashes

File "/Users/july/Library/Python/2.7/lib/python/site-packages/pip/_internal/operations/prepare.py", line 303, in _download_http_url

for chunk in download.chunks:

File "/Users/july/Library/Python/2.7/lib/python/site-packages/pip/_internal/utils/ui.py", line 160, in iter

for x in it:

File "/Users/july/Library/Python/2.7/lib/python/site-packages/pip/_internal/network/utils.py", line 39, in response_chunks

decode_content=False,

File "/Users/july/Library/Python/2.7/lib/python/site-packages/pip/_vendor/urllib3/response.py", line 564, in stream

data = self.read(amt=amt, decode_content=decode_content)

File "/Users/july/Library/Python/2.7/lib/python/site-packages/pip/_vendor/urllib3/response.py", line 529, in read

raise IncompleteRead(self._fp_bytes_read, self.length_remaining)

File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py", line 35, in __exit__

self.gen.throw(type, value, traceback)

File "/Users/july/Library/Python/2.7/lib/python/site-packages/pip/_vendor/urllib3/response.py", line 439, in _error_catcher

raise ReadTimeoutError(self._pool, None, "Read timed out.")

ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.

192:~ july$ pip install selenium

DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support

Defaulting to user installation because normal site-packages is not writeable

Collecting selenium

Downloading selenium-3.141.0-py2.py3-none-any.whl (904 kB)

|████████████████████████████████| 904 kB 3.9 kB/s

Collecting urllib3

Downloading urllib3-1.25.8-py2.py3-none-any.whl (125 kB)

|████████████████████████████████| 125 kB 3.8 kB/s

Installing collected packages: urllib3, selenium

Successfully installed selenium-3.141.0 urllib3-1.25.8

192:~ july$

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值