Install chromedriver on Mac M1 at specific location? - macos

I just made the jump from Ubuntu to MacBook Air M1.
I am trying to set-up the system in a way that I don't have to change scripts for both. i.e. I want to keep the scripts in such a way that editing on either system is ok.
In a script I use the following line of code:
driver = webdriver.Chrome("/usr/lib/chromium-browser/chromedriver")
I used Homebrew to install chromium-browser but I can't find the file (so I can move it to this location?).
I have tried almost everything I could look up and can't figure it out. What can I try next?

Install webdriver-manager, it allows you install and store chromedrive automatically
pip install webdriver-manager
and use like this:
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
driver = webdriver.Chrome(ChromeDriverManager().install())

The fastest way to to solve is using Home Brew:
brew install --cask chromedriver
Chromedriver will be installed in the correct path.

You can find the downloads for various versions of the Chrome driver here: https://chromedriver.chromium.org/downloads
For example, for v99 on Mac M1 you could download this archive: https://chromedriver.storage.googleapis.com/99.0.4844.51/chromedriver_mac64_m1.zip
Once downloaded just unzip & copy to whatever location you choose. After I installed I still needed to mark the application as "safe" in macOS, I followed the instructions here: https://stackoverflow.com/a/60362134/1371489

Related

idb-companion: command not found after installing via homebrew

I have installed idb-companion in line with the instructions in their docs, but when I run idb list-targets I get idb: command not found. idb-companion shows up when I brew list. I also tried installing and running the universal .tar.gz folder from their latest release, but got no where. Although I only ran that via the Finder GUI, because I wasn't sure how to execute that from the CLI.
I understand there is some homebrew path I may have to change. I have actually had homebrew issues before and so have usually resorted to installing everything via node where possible. In this case it's not, so I tried the .tar.gz file.
How can I get idb-companion to start working properly?
Most likely it is the case, your python path is not set. You need to set your python path. Faced the same issue was resolved with setting python path.

How to Start Dropbox After Installing It with Homebrew Cask?

I just started using Homebrew and Cask today to install Unix and OS X applications on my Mac but I don't understand something about Cask. When I run this command,
brew cask install dropbox
I can see that it installs it in /opt/homebrew-cask/Caskroom/dropbox/latest/Dropbox.app and I can see that it has created a symlink ~/Applications/Dropbox.app that points to it, but when I look in Finder at my Applications folder, I don't see it there as I would if I had installed Dropbox from a .dmg file. Also, I don't know how to start Dropbox from this symlink. How do I get Cask to install OS X apps so that I can start them from either the Application folder or via the command line in a terminal session?
just run open ~/Applications/Dropbox.app from your cmd line.
See http://gillesfabio.github.io/homebrew-cask-homepage/ for overview.
Hope that helps
The behavior has changed over the last few months. If you update homebrew to version 1.0 and then run brew cask install dropbox, the application will now be physically moved into /Applications/, and the symlink will be created in ~/Applications/.

-bash: scala: command not found

I'm trying to install scala on my mac (Maverick).
I downloaded and unarchived it.
I then put myself from where it was unarchived and inside the /bin folder in the terminal.
But when I run "scala" or "scalac" I get :
-bash: scala: command not found
Why?
I always suggest that mac users install homebrew and use homebrew as their primary package installer to install software.
Installing scala is as simple as
brew install scala
Homebrew will also install/fix java dependencies for you and handle path issues (I believe)
I get the same issue and quickly I found everything is fine, if you write the correct path into your .bash_profile.
The only thing you need is to close current terminal and open a new one, on which Scala would work.
Hope this work for you.
do you have Java installed and available on your PATH http://sourabhbajaj.com/mac-setup/Java/README.html the same author also provides good Scala / SBT setup info http://sourabhbajaj.com/mac-setup/Java/README.html

How can I install qpdf on Mac 10.8.3?

When running R CMD check on packages on a Mac build server, I'm getting a warning
‘qpdf’ is needed for checks on size reduction of PDFs
I can't seem to get qpdf installed and on the system. I tried installing via the fink package manager, but according to the package database (http://pdb.finkproject.org/pdb/package.php/qpdf), qpdf doesn't seem to have been built since osx 10.6, and I'm on 10.8.3.
Can anyone point me to qpdf mac install or build instructions? Or is there a way to disable the warning when checking R packages?
This is somewhat related to the question qpdf.exe for compactPDF?, although they were on a windows machine and I'm on a mac.
You can install qpdf with homebrew:
brew install qpdf
MacPorts can help you. Download MacPorts from http://www.macports.org/ and run sudo port install qpdf.

Where is PyGTK for Mac OS X?

Is there a binary out there for the current mac os x, python for PyGTK? I work with multiple desktop environments (mac, windows, gnome) and really consider python's lack of cross platform GUI's a problem. Does anyone know where I can find a built version of PyGTK and GTK for Mac?
I cant clone the git repository, it keeps timing out.
brew install pygtk worked for me (requires homebrew).
Confirmed to work with OS X 10.10 too, but by default it will install it into brew's Python distribution, so if you are still using the native python, it will not find it.
I don't use macports but it seems that jhbuild works for me. Below is the steps that I've done.
download gtk-osx-build-setup.sh from: https://raw.github.com/jralls/gtk-osx-build/master/gtk-osx-build-setup.sh and save it to your home directory.
fire up terminal and navigate to your home directory and run the command sh gtk-osx-build-setup.sh
the shell script will warn you that ~/.local/bin isn't added to your environment variable to do this, edit your .profile file located at your home directory and /Users/<username>/.local/bin to your environment variable. to know more on how to edit this file check out: http://www.tech-recipes.com/rx/2621/os_x_change_path_environment_variable/
after that, do a ~/.local/bin/jhbuild bootstrap command. it will download and install some necessary utilities.
download and install the beta version of the gtk+ osx framework at: http://ftp.imendio.com/pub/imendio/gtk-osx/Gtk-Framework-2.14-LATEST.dmg
before installing the meta-gtk-osx-python, you need to build and install some other packages that jhbuild doesn't install automatically, so what i did was i installed libpng by doing the command: ~/.local/bin/jhbuild build libpng
you also need to install libtiff so do the command: ~/.local/bin/jhbuild build libtiff
and also gtk-doc is needed so: ~/.local/bin/jhbuild build gtk-doc
and finally you can now install meta-gtk-osx-python by doing a: ~/.local/bin/jhbuild build meta-gtk-osx-python
Let me know if it works.
There is an installer for PyGTK 2.24 in test here, announced on the PyGTK list.
UPDATE project has moved on macpkg's sourceforge page.
I couldn't make it work with meld (segmentation fault), but sample PyGTK programs work OK.
UPDATE 2 since then a new package Py3GTK3 appeared on the same sourceforge page. Haven't tested though.
There is now a mac package on sourceforge
Download the latest package from http://sourceforge.net/projects/macpkg/files/PyGTK/ and install.
If you're just trying to use the system python, this is all you'll have to do.
If you're not, the following is how to install it with pyenv, which can be installed with Homebrew. With brew installed, you can install version pyenv and Python 2.7.8 with:
brew install pyenv && pyenv install 2.7.8
After you've done that, you'll then have copy the gtk package and its dependencies into your python installation:
cd /opt/gtk/lib/python2.7/site-packages/ && \
cp * ~/.pyenv/versions/2.7.8/lib/python2.7/site-packages/
That's it. You can also similarly install the Py3GTK3 package which has packages for python 2.7 and 3.2 from http://sourceforge.net/projects/macpkg/files/Py3GTK3/.
Have you tried doing it using macports? This website shows how.

Resources