[英]Trouble running InstaPy quickstart
I was able to install InstaPy on an Oracle Ampere Compute VM (ARM processors) running Ubuntu 20.04 LTS.我能够在运行 Ubuntu 20.04 LTS 的 Oracle Ampere Compute VM(ARM 处理器)上安装InstaPy 。 When I try running
quickstart.py
, it showed me the following errors:当我尝试运行
quickstart.py
时,它向我显示了以下错误:
/usr/lib/python3/dist-packages/requests/__init__.py:89: RequestsDependencyWarning: urllib3 (1.26.8) or chardet (3.0.4) doesn't match a supported version!
warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
InstaPy Version: 0.6.15
._. ._. ._. ._. ._. ._. ._. ._.
Workspace in use: "/home/ubuntu/InstaPy"
Traceback (most recent call last):
File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 71, in start
self.process = subprocess.Popen(cmd, env=self.env,
File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.8/subprocess.py", line 1704, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/bin/geckodriver'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "quickstart.py", line 5, in <module>
session = InstaPy(username='XXX', password='XXX', headless_browser=True)
File "/home/ubuntu/.local/lib/python3.8/site-packages/instapy/instapy.py", line 327, in __init__
self.browser, err_msg = set_selenium_local_session(
File "/home/ubuntu/.local/lib/python3.8/site-packages/instapy/browser.py", line 123, in set_selenium_local_session
browser = webdriver.Firefox(
File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/firefox/webdriver.py", line 174, in __init__
self.service.start()
File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 81, in start
raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.
I had to install an older version of the geckodriver meant for ARM processors and /usr/local/bin/geckodriver
is executable and present in PATH
.我必须安装适用于 ARM 处理器的旧版本geckodriver并且
/usr/local/bin/geckodriver
是可执行的并且存在于PATH
中。 How do I resolve this?我该如何解决这个问题?
EDIT: This is what it shows for echo $PATH
编辑:这是它为
echo $PATH
显示的内容
ubuntu@oracleampere:~$ echo $PATH
/home/ubuntu/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/bin/geckodriver
ubuntu@oracleampere:~$ geckodriver
-bash: /usr/local/bin/geckodriver: No such file or directory
ubuntu@oracleampere:~$
I finally got this to work but not on the Oracle Ampere Compute VMs.我终于让它工作了,但没有在 Oracle Ampere Compute VM 上工作。 Apparently it does not want to work with ARM processors.
显然它不想与 ARM 处理器一起工作。 I setup a standard ubuntu box running on Intel processors and that worked.
我设置了一个在 Intel 处理器上运行的标准 ubuntu 盒子,并且可以正常工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.