Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Installing PyChrome
#1
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!
Reply
#2
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
Reply
#3
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?
Reply
#4
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 python3
The path you get here is what you point in PyCharm Configuring Python Interpreter link.
Reply
#5
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
Reply
#6
(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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Click dropdown menu option with Selenium PyChrome AcszE 3 5,929 Oct-26-2017, 10:07 PM
Last Post: metulburr
  Click in the (…) icon in youtube with selenium PyChrome AcszE 6 16,262 Oct-19-2017, 02:45 AM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020