質問編集履歴
6
コード追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -67,7 +67,29 @@
|
|
67
67
|
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
|
68
68
|
ChromeDriver was started successfully.
|
69
69
|
```
|
70
|
+
ターミナルにてパスを実行したところ以下の実行結果になりました。
|
71
|
+
```ターミナル
|
72
|
+
(base)***@***~ % echo 'export PATH="/Users/***/Desktop/chromedriver.file:$PATH"'
|
73
|
+
export PATH="/Users/***/Desktop/chromedriver.file:$PATH"
|
74
|
+
(base)***@***~ % echo 'export PATH="/Users/***/Desktop/chromedriver.file:$PATH"' >> ~/.zshrc
|
75
|
+
(base)***@***~ %
|
76
|
+
(base)***@***~ % which chromedriver
|
77
|
+
/Users/***/opt/chromedriver
|
78
|
+
chromedriver not found
|
79
|
+
zsh: no such file or directory: /Users/***/opt/chromedriver
|
80
|
+
(base) ***@***~ % which chromedriver/Users/***/opt/chromedriver
|
81
|
+
chromedriver/Users/***/opt/chromedriver not found
|
82
|
+
(base)***@***~ % $ which chromedriver
|
83
|
+
/Users/***/opt/chromedriver
|
84
|
+
zsh: command not found: $
|
85
|
+
zsh: no such file or directory: /Users/***/opt/chromedriver
|
86
|
+
(base)***@***~ % $ chromedriver -v
|
87
|
+
ChromeDriver 84.0.4147.30
|
88
|
+
zsh: command not found: $
|
89
|
+
zsh: command not found: ChromeDriver
|
70
90
|
|
91
|
+
```
|
92
|
+
|
71
93
|
以下のリンクからChromedriverを同じbit数verのをインストールしましたが、再度jupyterlabでリロードしましたが、同じエラーが出てしまいます。
|
72
94
|
|
73
95
|
https://sites.google.com/a/chromium.org/chromedriver/home
|
5
コード追加
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|
4
変更点追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -55,6 +55,19 @@
|
|
55
55
|
|
56
56
|
WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
|
57
57
|
```
|
58
|
+
インストールしたChromedriverをターミナルで開いて見ると、以下ののように完成されている状態です。
|
59
|
+
```jupyterlab
|
60
|
+
/Users/***/Desktop/chromedriver.file/chromedriver ; exit;
|
61
|
+
[2] 89563
|
62
|
+
[2] + exit 1 command -v pyenv 2 > /dev/null
|
63
|
+
/Users/***/.zshrc:20: command not found: 1
|
64
|
+
(base)***@***~ % /Users/***/Desktop/chromedriver.file/chromedriver ; exit;
|
65
|
+
Starting ChromeDriver 84.0.4147.30 (48b3e868b4cc0aa7e8149519690b6f6949e110a8-refs/branch-heads/4147@{#310}) on port 9515
|
66
|
+
Only local connections are allowed.
|
67
|
+
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
|
68
|
+
ChromeDriver was started successfully.
|
69
|
+
```
|
70
|
+
|
58
71
|
以下のリンクからChromedriverを同じbit数verのをインストールしましたが、再度jupyterlabでリロードしましたが、同じエラーが出てしまいます。
|
59
72
|
|
60
73
|
https://sites.google.com/a/chromium.org/chromedriver/home
|
3
コード追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -2,7 +2,20 @@
|
|
2
2
|
不足点なのがあればご質問で質問していただけると幸いです。
|
3
3
|
ご教授お願いします。
|
4
4
|
|
5
|
+
以下のコード echo $PATH を実行した結果です。
|
5
6
|
```jupyterlab
|
7
|
+
~ % echo $PATH
|
8
|
+
|
9
|
+
/Users/***/.pyenv/shims:/Users/***/.pyenv/bin:/Users/***/opt/anaconda3/bin:/Users/***/opt/anaconda3/condabin:/Users/***/.nodebrew/current/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin
|
10
|
+
zsh: command not found:
|
11
|
+
(base)***@***~ % which chromedriver
|
12
|
+
chromedriver not found
|
13
|
+
(base)***@***~ % which chromedriver
|
14
|
+
chromedriver not found
|
15
|
+
|
16
|
+
```
|
17
|
+
|
18
|
+
```jupyterlab
|
6
19
|
!pip install selenium
|
7
20
|
↓
|
8
21
|
!pip install beautifulsoup4
|
2
文法修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -16,7 +16,8 @@
|
|
16
16
|
↓
|
17
17
|
browser = webdriver.Chrome()
|
18
18
|
browser.implicitly_wait(3)
|
19
|
+
↓
|
19
|
-
エラー
|
20
|
+
エラー
|
20
21
|
```
|
21
22
|
エラー内容。
|
22
23
|
```jupyterlab
|
@@ -29,33 +30,9 @@
|
|
29
30
|
71 cmd.extend(self.command_line_args())
|
30
31
|
---> 72 self.process = subprocess.Popen(cmd, env=self.env,
|
31
32
|
73 close_fds=platform.system() != 'Windows',
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
--> 854 self._execute_child(args, executable, preexec_fn, close_fds,
|
36
|
-
855 pass_fds, cwd, env,
|
37
|
-
|
38
|
-
~/.pyenv/versions/3.8.0/lib/python3.8/subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session)
|
39
|
-
1701 err_msg = os.strerror(errno_num)
|
40
|
-
-> 1702 raise child_exception_type(errno_num, err_msg, err_filename)
|
41
|
-
1703 raise child_exception_type(err_msg)
|
42
|
-
|
43
|
-
FileNotFoundError: [Errno 2] No such file or directory: 'chromedriver'
|
44
|
-
|
45
|
-
During handling of the above exception, another exception occurred:
|
46
|
-
|
47
|
-
WebDriverException Traceback (most recent call last)
|
48
|
-
<ipython-input-28-98b0f9aa9af3> in <module>
|
49
|
-
----> 1 browser = webdriver.Chrome()
|
50
|
-
2 browser.implicitly_wait(3)
|
51
|
-
|
52
|
-
~/.pyenv/versions/3.8.0/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py in __init__(self, executable_path, port, options, service_args, desired_capabilities, service_log_path, chrome_options, keep_alive)
|
53
|
-
71 service_args=service_args,
|
54
|
-
72 log_path=service_log_path)
|
55
|
-
---> 73 self.service.start()
|
56
|
-
74
|
57
|
-
75 try:
|
58
|
-
|
33
|
+
↓
|
34
|
+
↓
|
35
|
+
↓
|
59
36
|
~/.pyenv/versions/3.8.0/lib/python3.8/site-packages/selenium/webdriver/common/service.py in start(self)
|
60
37
|
79 except OSError as err:
|
61
38
|
80 if err.errno == errno.ENOENT:
|
@@ -65,6 +42,6 @@
|
|
65
42
|
|
66
43
|
WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
|
67
44
|
```
|
68
|
-
以下のリンクからChromedriverを同じbit数verのをインストールしましたが、再度jupyterlabで
|
45
|
+
以下のリンクからChromedriverを同じbit数verのをインストールしましたが、再度jupyterlabでリロードしましたが、同じエラーが出てしまいます。
|
69
46
|
|
70
47
|
https://sites.google.com/a/chromium.org/chromedriver/home
|
1
コード追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
Chromeにてjupyter labを起動し、seleniumのダウンロードしているプロセスにてbrowser = webdriver.Chrome()をダウンロードしたのですが、エラーが起きてしまったので、
|
1
|
+
Chromeにてjupyter labを起動し、seleniumのダウンロードしているプロセスにてbrowser = webdriver.Chrome()をダウンロードしたのですが、エラーが起きてしまったので、エラー内容が以下のコードになります。
|
2
|
+
不足点なのがあればご質問で質問していただけると幸いです。
|
3
|
+
ご教授お願いします。
|
2
4
|
|
3
5
|
```jupyterlab
|
4
6
|
!pip install selenium
|