![]() |
Installing PyChrome - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html) +--- Thread: Installing PyChrome (/thread-7372.html) |
Installing PyChrome - simiugor - Jan-07-2018 Hello, I watched a tutorial for some basic web bot. I was told I need PyChrome and Selenium. I am just beginning with Python and my skills are really low and I am very confused with installing PyChrome and Selenium. Can you tell me how to install these two needed things on Mac OS? I found this link: https://pychrome.wordpress.com/install/ Thank you! RE: Installing PyChrome - snippsat - Jan-07-2018 Installing Python 3 on Mac OS X pip is a important part of Python,and most work.Quote:Homebrew version of Python 3 is installed then pip3 will point to Python 3.Then install from command line is: pip3 install pychrome pip3 install selenium RE: Installing PyChrome - simiugor - Jan-07-2018 Alright I already got this in terminal. One more question. I like using PyCharm as an editor or how to call this. Any ways of installing these two in there? RE: Installing PyChrome - snippsat - Jan-07-2018 You point PyCharm(Configuring Python Interpreter) to the Python version you want to use(which now should be Python 3 and you installed with pip3). Look at this post So you update Path test that python3 command work. Then can run. $ which python3The path you get here is what you point in PyCharm Configuring Python Interpreter link. RE: Installing PyChrome - simiugor - Jan-07-2018 What am I doing wrong? from selenium import webdriver >>> from pyChrome import PyChrome >>> url = "www.instagram.com" >>> browser = PyChrome() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "pyChrome.py", line 96, in __init__ self.__start(ghostmode=self.ghost) File "pyChrome.py", line 192, in __start self.window = Window(self.driver, config_filename=self.config_filename) File "/Users/simonugor/Desktop/test/pyChrome/src/window.py", line 79, in __init__ self.size(self.sizeWin) File "/Users/simonugor/Desktop/test/pyChrome/src/window.py", line 130, in size self.driver.set_window_size(self.sizeWin[0], self.sizeWin[1]) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 1071, in set_window_size 'windowHandle': windowHandle}) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 312, in execute self.error_handler.check_response(response) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 237, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: unknown error: cannot get automation extension from unknown error: page could not be found: chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html (Session info: chrome=63.0.3239.132) (Driver info: chromedriver=2.29.461585 (0be2cd95f834e9ee7c46bcc7cf405b483f5ae83b),platform=Mac OS X 10.11.6 x86_64) >>> browser.open(url) Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'browser' is not defined RE: Installing PyChrome - snippsat - Jan-07-2018 (Jan-07-2018, 08:19 PM)simiugor Wrote: What am I doing wrong?You are using Python 2,i have only given instruction for Python 3. Versions/2.7/lib/python2.7/site-packages |