QWeb requires packages that are hardware dependent and that needs to be taken into account when installing to a M1 based Mac.
QWeb installs directly from pip and no extra steps needed.
If missing, install Homebrew and check step 3 from the following Big Sur instructions.
To install browser drivers use webdrivermanager. Check step 7 from the following Big Sur instructions.
Prerequisites: Command Line Tools and Homebrew installed.
Go to Miniforge page and download installer for OS X arm64 (Apple Silicon). You should now have the installer in Downloads folder.
Next open terminal and navigate to Downloads folder. Make the installer executable and run it:
chmod +x Miniforge3-MacOSX-arm64.sh
./Miniforge3-MacOSX-arm64.sh
You can accept the defaults and answer Yes to all questions. Now make sure that Miniforge3 is the path environments use from here on.
~/miniforge3/condabin/conda
And
~/miniforge3/condabin/conda init
Last step is to make sure we use the preferred channel with conda.
conda config --add channels conda-forge
conda config --set channel_priority strict
Now you should have Miniforge3 installed.
Using the conda command from Miniforge3 create a new environment and activate it.
conda create -n qweb_env python=3.9
conda activate qweb_env
QWeb uses ffmpeg for handling screenshots. It is not available by default and needs to be installed separately using Homebrew. Open new terminal window and type:
brew install ffmpeg
Go to your project folder and clone QWeb from GitHub:
git clone https://github.com/qentinelqi/qweb.git
If git is not found you can install it with Homebrew.
Install scikit-image with conda, currently the required version is 0.19.1:
conda install scikit-image==0.19.1
Now QWeb can be installed to the environment. Installation needs to happen from the local clone:
pip install -e <path to local QWeb project>
The last step is to use webdriver manager to install chromedriver. Install webdriver manager using pip:
pip install webdrivermanager
Install chromedriver using webdriver manager:
webdrivermanager --linkpath AUTO chrome
Now your environment should be ready!