Hello!
So I’m having trouble installing Fastbook locally on my machine. I’ve tried searching the forums to see if someone has had a similar error to mine, but it seems not.
I’m simply running:
pip install fastbook
I have also tried pip install -Uqq fastbook
and it produces the same error. Judging by the logs below, do I need to install a Rust compiler?
I’m using a Mac with an M1 chip, Python 3.10.4, and macOS Monterey 12.3.1.
Any help would be appreciated!
The following is my output log:
Collecting fastbook
Using cached fastbook-0.0.26-py3-none-any.whl (719 kB)
Collecting pandas
Using cached pandas-1.4.2-cp310-cp310-macosx_11_0_arm64.whl (10.1 MB)
Collecting graphviz
Using cached graphviz-0.20-py3-none-any.whl (46 kB)
Collecting sentencepiece
Using cached sentencepiece-0.1.96-cp310-cp310-macosx_11_0_arm64.whl
Collecting fastai>=2.6
Using cached fastai-2.6.3-py3-none-any.whl (197 kB)
Collecting datasets
Using cached datasets-2.2.2-py3-none-any.whl (346 kB)
Collecting packaging
Using cached packaging-21.3-py3-none-any.whl (40 kB)
Collecting transformers
Using cached transformers-4.19.2-py3-none-any.whl (4.2 MB)
Collecting requests
Using cached requests-2.27.1-py2.py3-none-any.whl (63 kB)
Requirement already satisfied: pip in /Users/[REDACTED]/PycharmProjects/DDGImageScraper/venv/lib/python3.10/site-packages (from fastbook) (21.3.1)
Collecting torch<1.12,>=1.7.0
Using cached torch-1.11.0-cp310-none-macosx_11_0_arm64.whl (43.1 MB)
Collecting torchvision>=0.8.2
Using cached torchvision-0.12.0-cp310-cp310-macosx_11_0_arm64.whl (1.2 MB)
Collecting scikit-learn
Using cached scikit_learn-1.1.1-cp310-cp310-macosx_12_0_arm64.whl (7.7 MB)
Collecting spacy<4
Using cached spacy-3.3.1-cp310-cp310-macosx_11_0_arm64.whl (6.3 MB)
Collecting fastcore<1.5,>=1.3.27
Using cached fastcore-1.4.4-py3-none-any.whl (60 kB)
Collecting fastdownload<2,>=0.0.5
Using cached fastdownload-0.0.6-py3-none-any.whl (12 kB)
Collecting fastprogress>=0.2.4
Using cached fastprogress-1.0.2-py3-none-any.whl (12 kB)
Collecting scipy
Using cached scipy-1.8.1-cp310-cp310-macosx_12_0_arm64.whl (28.7 MB)
Collecting matplotlib
Using cached matplotlib-3.5.2-cp310-cp310-macosx_11_0_arm64.whl (7.2 MB)
Collecting pillow>6.0.0
Using cached Pillow-9.1.1-cp310-cp310-macosx_11_0_arm64.whl (2.8 MB)
Collecting pyyaml
Using cached PyYAML-6.0-cp310-cp310-macosx_11_0_arm64.whl (173 kB)
Collecting responses<0.19
Using cached responses-0.18.0-py3-none-any.whl (38 kB)
Collecting dill<0.3.5
Using cached dill-0.3.4-py2.py3-none-any.whl (86 kB)
Collecting tqdm>=4.62.1
Using cached tqdm-4.64.0-py2.py3-none-any.whl (78 kB)
Collecting fsspec[http]>=2021.05.0
Using cached fsspec-2022.5.0-py3-none-any.whl (140 kB)
Collecting pyarrow>=6.0.0
Using cached pyarrow-8.0.0-cp310-cp310-macosx_11_0_arm64.whl (16.2 MB)
Collecting aiohttp
Using cached aiohttp-3.8.1-cp310-cp310-macosx_11_0_arm64.whl (552 kB)
Collecting huggingface-hub<1.0.0,>=0.1.0
Using cached huggingface_hub-0.7.0-py3-none-any.whl (86 kB)
Collecting numpy>=1.17
Using cached numpy-1.22.4-cp310-cp310-macosx_11_0_arm64.whl (12.8 MB)
Collecting xxhash
Using cached xxhash-3.0.0-cp310-cp310-macosx_11_0_arm64.whl (30 kB)
Collecting multiprocess
Using cached multiprocess-0.70.13-py310-none-any.whl (133 kB)
Collecting idna<4,>=2.5
Using cached idna-3.3-py3-none-any.whl (61 kB)
Collecting charset-normalizer~=2.0.0
Using cached charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
Collecting urllib3<1.27,>=1.21.1
Using cached urllib3-1.26.9-py2.py3-none-any.whl (138 kB)
Collecting certifi>=2017.4.17
Using cached certifi-2022.5.18.1-py3-none-any.whl (155 kB)
Collecting pyparsing!=3.0.5,>=2.0.2
Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
Collecting pytz>=2020.1
Using cached pytz-2022.1-py2.py3-none-any.whl (503 kB)
Collecting python-dateutil>=2.8.1
Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting tokenizers!=0.11.3,<0.13,>=0.11.1
Using cached tokenizers-0.12.1.tar.gz (220 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Collecting regex!=2019.12.17
Using cached regex-2022.6.2-cp310-cp310-macosx_11_0_arm64.whl (281 kB)
Collecting filelock
Using cached filelock-3.7.1-py3-none-any.whl (10 kB)
Collecting typing-extensions>=3.7.4.3
Using cached typing_extensions-4.2.0-py3-none-any.whl (24 kB)
Collecting six>=1.5
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting pathy>=0.3.5
Using cached pathy-0.6.1-py3-none-any.whl (42 kB)
Collecting typer<0.5.0,>=0.3.0
Using cached typer-0.4.1-py3-none-any.whl (27 kB)
Collecting spacy-loggers<2.0.0,>=1.0.0
Using cached spacy_loggers-1.0.2-py3-none-any.whl (7.2 kB)
Requirement already satisfied: setuptools in /Users/[REDACTED]/PycharmProjects/DDGImageScraper/venv/lib/python3.10/site-packages (from spacy<4->fastai>=2.6->fastbook) (60.2.0)
Collecting wasabi<1.1.0,>=0.9.1
Using cached wasabi-0.9.1-py3-none-any.whl (26 kB)
Collecting langcodes<4.0.0,>=3.2.0
Using cached langcodes-3.3.0-py3-none-any.whl (181 kB)
Collecting pydantic!=1.8,!=1.8.1,<1.9.0,>=1.7.4
Using cached pydantic-1.8.2-py3-none-any.whl (126 kB)
Collecting spacy-legacy<3.1.0,>=3.0.9
Using cached spacy_legacy-3.0.9-py2.py3-none-any.whl (20 kB)
Collecting blis<0.8.0,>=0.4.0
Using cached blis-0.7.7-cp310-cp310-macosx_11_0_arm64.whl (1.1 MB)
Collecting cymem<2.1.0,>=2.0.2
Using cached cymem-2.0.6-cp310-cp310-macosx_11_0_arm64.whl (30 kB)
Collecting thinc<8.1.0,>=8.0.14
Using cached thinc-8.0.17-cp310-cp310-macosx_11_0_arm64.whl (584 kB)
Collecting srsly<3.0.0,>=2.4.3
Using cached srsly-2.4.3-cp310-cp310-macosx_11_0_arm64.whl (457 kB)
Collecting murmurhash<1.1.0,>=0.28.0
Using cached murmurhash-1.0.7-cp310-cp310-macosx_11_0_arm64.whl (19 kB)
Collecting catalogue<2.1.0,>=2.0.6
Using cached catalogue-2.0.7-py3-none-any.whl (17 kB)
Collecting preshed<3.1.0,>=3.0.2
Using cached preshed-3.0.6-cp310-cp310-macosx_11_0_arm64.whl (101 kB)
Collecting jinja2
Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB)
Collecting async-timeout<5.0,>=4.0.0a3
Using cached async_timeout-4.0.2-py3-none-any.whl (5.8 kB)
Collecting aiosignal>=1.1.2
Using cached aiosignal-1.2.0-py3-none-any.whl (8.2 kB)
Collecting yarl<2.0,>=1.0
Using cached yarl-1.7.2-cp310-cp310-macosx_11_0_arm64.whl (118 kB)
Collecting multidict<7.0,>=4.5
Using cached multidict-6.0.2-cp310-cp310-macosx_11_0_arm64.whl (29 kB)
Collecting frozenlist>=1.1.1
Using cached frozenlist-1.3.0-cp310-cp310-macosx_11_0_arm64.whl (34 kB)
Collecting attrs>=17.3.0
Using cached attrs-21.4.0-py2.py3-none-any.whl (60 kB)
Collecting cycler>=0.10
Using cached cycler-0.11.0-py3-none-any.whl (6.4 kB)
Collecting kiwisolver>=1.0.1
Using cached kiwisolver-1.4.2-cp310-cp310-macosx_11_0_arm64.whl (63 kB)
Collecting fonttools>=4.22.0
Using cached fonttools-4.33.3-py3-none-any.whl (930 kB)
Collecting multiprocess
Using cached multiprocess-0.70.12.2-py39-none-any.whl (128 kB)
Collecting joblib>=1.0.0
Using cached joblib-1.1.0-py2.py3-none-any.whl (306 kB)
Collecting threadpoolctl>=2.0.0
Using cached threadpoolctl-3.1.0-py3-none-any.whl (14 kB)
Collecting smart-open<6.0.0,>=5.0.0
Using cached smart_open-5.2.1-py3-none-any.whl (58 kB)
Collecting click<9.0.0,>=7.1.1
Using cached click-8.1.3-py3-none-any.whl (96 kB)
Collecting MarkupSafe>=2.0
Using cached MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_universal2.whl (17 kB)
Building wheels for collected packages: tokenizers
Building wheel for tokenizers (pyproject.toml): started
Building wheel for tokenizers (pyproject.toml): finished with status 'error'
Failed to build tokenizers
ERROR: Command errored out with exit status 1:
command: /Users/[REDACTED]/PycharmProjects/DDGImageScraper/venv/bin/python /Users/[REDACTED]/PycharmProjects/DDGImageScraper/venv/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /var/folders/6_/v4ftgpss5hg7cn0bdj3dr02h0000gn/T/tmphaz_a2wx
cwd: /private/var/folders/6_/v4ftgpss5hg7cn0bdj3dr02h0000gn/T/pip-install-aoe_4xqg/tokenizers_5536a17e45db481dbc345808907fa754
Complete output (18 lines):
running bdist_wheel
running build
running build_py
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
running build_rust
error: can't find Rust compiler
If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.
To update pip, run:
pip install --upgrade pip
and then retry package installation.
If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.
----------------------------------------
ERROR: Failed building wheel for tokenizers
ERROR: Could not build wheels for tokenizers, which is required to install pyproject.toml-based projects
WARNING: You are using pip version 21.3.1; however, version 22.1.2 is available.
You should consider upgrading via the '/Users/[REDACTED]/PycharmProjects/DDGImageScraper/venv/bin/python -m pip install --upgrade pip' command.