When I try to install FontBakery, I get the following error:
Collecting fontbakery (from -r requirements.txt (line 8))
Using cached https://files.pythonhosted.org/packages/a6/19/07b7166d7ff8f95a7beb41ae533a23c283a539f771b0baad0f9983adea04/fontbakery-0.0.13.tar.gz
ERROR: Complete output from command python setup.py egg_info:
ERROR: Traceback (most recent call last):
File "/private/var/folders/sr/fzxs628x5gbgjtwscngjdcqh0000gn/T/pip-install-gt4owhmn/fontbakery/setup.py", line 25, in <module>
import fontforge
ModuleNotFoundError: No module named 'fontforge'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/sr/fzxs628x5gbgjtwscngjdcqh0000gn/T/pip-install-gt4owhmn/fontbakery/setup.py", line 27, in <module>
raise Exception(msg)
Exception: Python module `fontforge` is required. Install it with `apt-get install python-fontforge` or `brew install python; brew install fontforge --HEAD`
----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/sr/fzxs628x5gbgjtwscngjdcqh0000gn/T/pip-install-gt4owhmn/fontbakery/
So, I ran:
โถ brew install python; brew install fontforge --HEAD
Warning: python 3.7.3 is already installed and up-to-date
To reinstall 3.7.3, run `brew reinstall python`
Warning: fontforge is already installed
The currently linked version is 20190413
You can use `brew switch fontforge ` to link this version.
Then
โถ brew switch fontforge 20190413
Cleaning /usr/local/Cellar/fontforge/20190413
55 links created for /usr/local/Cellar/fontforge/20190413
But I ended up with the same error as before.
I expect FontBakery to install without this error, because I have already install fontforge, as homebrew confirms.
Encode Sans at https://github.com/thundernixon/Encode-Sans/tree/4c0afcc9e79bd91238ebb4a834516b93fa128d7b
Your log mentions fontbakery-0.0.13 which is super outdated. You are propbably attempting to install it with python 2. Use Python 3 instead.
OHH woah.
If I install with pip install fontbakery, it downloads the correct version. However, if I install from a requirements file with pip install -r requirements.txt, this issue comes up.
I think my problem is related to this: https://stackoverflow.com/a/17153977. I'll update if I can figure out how to debug this.
https://stackoverflow.com/a/17153977 :
You can get pip to give verbose output using the -v flag ... but one isn't enough. I RTFM-ed the help, which said you can do -v multiple times, up to 3x, for more verbose output.
This is, hands down, one of the stupidest things I've ever read.
It doesn't look like -v or verbose output is possible in pip 19.1.1, by the way.
https://pip.pypa.io/en/stable/reference/pip_install/#options
pip install --ignore-installed -r requirements.txt might do it?
Here is where you can find (and clear) your pip cache if necessary: https://stackoverflow.com/a/31807659
Hahaha, that is incredible.
But wait ... that literally IS in the pip doc.
-v, --verbose Give more output. Option is additive, and can be used up to 3 times.
(venv)
type-repos/google-font-repos/Encode-Sans master โ 4h25m โ โ
โถ pip --help
Usage:
pip <command> [options]
Commands:
install Install packages.
download Download packages.
uninstall Uninstall packages.
freeze Output installed packages in requirements format.
list List installed packages.
show Show information about installed packages.
check Verify installed packages have compatible dependencies.
config Manage local and global configuration.
search Search PyPI for packages.
wheel Build wheels from your requirements.
hash Compute hashes of package archives.
completion A helper command used for command completion.
help Show help for commands.
General Options:
-h, --help Show help.
--isolated Run pip in an isolated mode, ignoring environment variables and user configuration.
-v, --verbose Give more output. Option is additive, and can be used up to 3 times.
-V, --version Show version and exit.
-q, --quiet Give less output. Option is additive, and can be used up to 3 times (corresponding to WARNING, ERROR, and CRITICAL logging levels).
--log <path> Path to a verbose appending log.
--proxy <proxy> Specify a proxy in the form [user:passwd@]proxy.server:port.
--retries <retries> Maximum number of retries each connection should attempt (default 5 times).
--timeout <sec> Set the socket timeout (default 15 seconds).
--exists-action <action> Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort.
--trusted-host <hostname> Mark this host as trusted, even though it does not have valid or any HTTPS.
--cert <path> Path to alternate CA bundle.
--client-cert <path> Path to SSL client certificate, a single file containing the private key and the certificate in PEM format.
--cache-dir <dir> Store the cache data in <dir>.
--no-cache-dir Disable the cache.
--disable-pip-version-check
Don't periodically check PyPI to determine whether a new version of pip is available for download. Implied with --no-index.
--no-color Suppress colored output
Are you on the newest pip?
Tried @chrissimpkins's advice, but got the same errors.
Then tried to rm -rf /Users/stephennixon/Library/Caches/pip, and then use pip install --ignore-installed -r requirements.txt, but I _still_ got the same error:
Collecting fontbakery (from -r requirements.txt (line 8))
Downloading https://files.pythonhosted.org/packages/a6/19/07b7166d7ff8f95a7beb41ae533a23c283a539f771b0baad0f9983adea04/fontbakery-0.0.13.tar.gz (163kB)
|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 163kB 21.6MB/s
ERROR: Complete output from command python setup.py egg_info:
ERROR: Traceback (most recent call last):
File "/private/var/folders/sr/fzxs628x5gbgjtwscngjdcqh0000gn/T/pip-install-mw83abzv/fontbakery/setup.py", line 25, in <module>
import fontforge
ModuleNotFoundError: No module named 'fontforge'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/sr/fzxs628x5gbgjtwscngjdcqh0000gn/T/pip-install-mw83abzv/fontbakery/setup.py", line 27, in <module>
raise Exception(msg)
Exception: Python module `fontforge` is required. Install it with `apt-get install python-fontforge` or `brew install python; brew install fontforge --HEAD`
----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/sr/fzxs628x5gbgjtwscngjdcqh0000gn/T/pip-install-mw83abzv/fontbakery/
Are you on the newest pip?
Yes, 19.1.1 is the latest.
โถ pip --version
pip 19.1.1 from /Users/stephennixon/type-repos/google-font-repos/Encode-Sans/venv/lib/python3.7/site-packages/pip (python 3.7)
Are you in a venv?
Edit:
Appears yes:
/Users/stephennixon/type-repos/google-font-repos/Encode-Sans/venv/lib/python3.7/site-packages/pip
Oh, I have this error sometimes too. It usually happens when pip tries to install something system-wide for some reason. Try adding --user at the end.
Maybe try changing the requirements.txt to define fontbakery>=0.7.0? Odd issue.
I think that this may be due to the fact that the Python fontforge module is coming from a brew install of fontforge command line tools (not from pip3 where it doesn't exist/is not distributed). Looking at the Homebrew Ruby formula for fontforge, it seems that the Python module that it installs is Py2 only. Your Py3 venv can't import it. The old FB version doesn't handle the fontforge import exception and chokes...
I think :)
Aha, @chrissimpkins is probably right. fontbakery always pooped out on that check for me.
Hmm, well, after trying to downgrade to pip 18.1 and run it again, I ended up with a slightly different error:
ModuleNotFoundError: No module named 'skbuild'
...and this stuck when I upgraded to pip 19.1.1 again.
full output
(venv) type-repos/google-font-repos/Encode-Sans master โ
โถ pip install --no-cache-dir -r requirements.txt
/Users/stephennixon/type-repos/google-font-repos/Encode-Sans/venv/lib/python3.7/site-packages/pip/_internal/req/req_file.py:184: UserWarning: Disabling all use of wheels due to the use of --build-options / --global-options / --install-options.
cmdoptions.check_install_build_global(options, opts)
Collecting git+https://github.com/googlefonts/gftools (from -r requirements.txt (line 10))
Cloning https://github.com/googlefonts/gftools to /private/var/folders/sr/fzxs628x5gbgjtwscngjdcqh0000gn/T/pip-req-build-msloqwg0
Running command git clone -q https://github.com/googlefonts/gftools /private/var/folders/sr/fzxs628x5gbgjtwscngjdcqh0000gn/T/pip-req-build-msloqwg0
Running command git submodule update --init --recursive -q
Requirement already satisfied: fonttools[lxml,ufo,woff] in ./venv/lib/python3.7/site-packages (from -r requirements.txt (line 1)) (3.41.0)
Collecting fontmake (from -r requirements.txt (line 2))
Downloading https://files.pythonhosted.org/packages/40/9a/4352ab54f91cdbcffcc126e46ffa296bb23dff8c8ee775173e4a36881b3f/fontmake-1.9.3.zip (66kB)
|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 71kB 10.8MB/s
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Collecting Pillow>=5.4.1 (from -r requirements.txt (line 3))
Downloading https://files.pythonhosted.org/packages/81/1a/6b2971adc1bca55b9a53ed1efa372acff7e8b9913982a396f3fa046efaf8/Pillow-6.0.0.tar.gz (29.5MB)
|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 29.5MB 21.9MB/s
Requirement already satisfied: idna==2.8 in ./venv/lib/python3.7/site-packages (from -r requirements.txt (line 4)) (2.8)
Requirement already satisfied: requests==2.21.0 in ./venv/lib/python3.7/site-packages (from -r requirements.txt (line 5)) (2.21.0)
Requirement already satisfied: urllib3>=1.24.2 in ./venv/lib/python3.7/site-packages (from -r requirements.txt (line 6)) (1.24.3)
Requirement already satisfied: fs in ./venv/lib/python3.7/site-packages (from -r requirements.txt (line 7)) (2.4.5)
Requirement already satisfied: fontbakery>=0.7.0 in ./venv/lib/python3.7/site-packages (from -r requirements.txt (line 8)) (0.7.4)
Requirement already satisfied: protobuf>=3.7.0 in ./venv/lib/python3.7/site-packages (from -r requirements.txt (line 9)) (3.7.1)
Requirement already satisfied: setuptools in ./venv/lib/python3.7/site-packages (from gftools==0.2.0->-r requirements.txt (line 10)) (41.0.1)
Collecting Flask (from gftools==0.2.0->-r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/4b/12/c1fbf4971fda0e4de05565694c9f0c92646223cff53f15b6eb248a310a62/Flask-1.0.2.tar.gz (644kB)
|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 645kB 19.5MB/s
Collecting absl-py (from gftools==0.2.0->-r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/da/3f/9b0355080b81b15ba6a9ffcf1f5ea39e307a2778b2f2dc8694724e8abd5b/absl-py-0.7.1.tar.gz (99kB)
|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 102kB 21.4MB/s
Collecting glyphsLib (from gftools==0.2.0->-r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/90/88/2d37c6869784fd68ca6e925ac9c6bf51e4a0df1a922d36b1febdbb5846af/glyphsLib-3.3.1.zip (901kB)
|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 911kB 23.4MB/s
Collecting tabulate (from gftools==0.2.0->-r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/c2/fd/202954b3f0eb896c53b7b6f07390851b1fd2ca84aa95880d7ae4f434c4ac/tabulate-0.8.3.tar.gz (46kB)
|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 51kB 23.6MB/s
Collecting unidecode (from gftools==0.2.0->-r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/9b/d8/c1b658ed7ff6e63a745eda483d7d917eb63a79c59fcb422469b85ff47e94/Unidecode-1.0.23.tar.gz (210kB)
|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 215kB 21.7MB/s
Collecting fontdiffenator (from gftools==0.2.0->-r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/99/f9/15c5ac193894ed5b872869f9f68afe770debc46bfa972911c30f73c43928/fontdiffenator-0.7.16.tar.gz
Collecting gfdiffbrowsers (from gftools==0.2.0->-r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/9a/be/991b5eb5761d21ed3f112602c9c0c80a41f322c117c25c3d36b6331a4940/gfdiffbrowsers-0.1.4.tar.gz
Requirement already satisfied: lxml<5,>=4.0; extra == "lxml" in ./venv/lib/python3.7/site-packages (from fonttools[lxml,ufo,woff]->-r requirements.txt (line 1)) (4.3.3)
Collecting zopfli>=0.1.4; extra == "woff" (from fonttools[lxml,ufo,woff]->-r requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/f1/93/d910e94a30a67821ef253cee90a6d31f4136305339ffabce94c9deb1beb6/zopfli-0.1.6.zip (75kB)
|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 81kB 58.8MB/s
Collecting brotli>=1.0.1; platform_python_implementation != "PyPy" and extra == "woff" (from fonttools[lxml,ufo,woff]->-r requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/cd/9c/7955895f5672ecc85270244582c6b53ff95bb4c24bf77bd9271d42351635/Brotli-1.0.7.zip (496kB)
|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 501kB 54.4MB/s
Collecting MutatorMath>=2.1.2 (from fontmake->-r requirements.txt (line 2))
Downloading https://files.pythonhosted.org/packages/38/48/40a5391de17b90b12c566cd778e572c47b22666b23e7f7735f3117a0b737/MutatorMath-2.1.2.zip (421kB)
|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 430kB 50.5MB/s
Requirement already satisfied: defcon[lxml]>=0.6.0 in ./venv/lib/python3.7/site-packages (from fontmake->-r requirements.txt (line 2)) (0.6.0)
Collecting booleanOperations>=0.8.2 (from fontmake->-r requirements.txt (line 2))
Downloading https://files.pythonhosted.org/packages/e6/99/1ded4964e5d0c9d0d10800fadaa6b9e653f615e630e99745ea35bacc5678/booleanOperations-0.8.2.zip (202kB)
|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 204kB 35.9MB/s
Collecting cu2qu>=1.6.5 (from fontmake->-r requirements.txt (line 2))
Downloading https://files.pythonhosted.org/packages/ae/f5/81b7f453c51574ea6563df5dde4c952077cb51f8d0dffffc71ff566510d2/cu2qu-1.6.5.zip (217kB)
|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 225kB 19.5MB/s
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Collecting ufo2ft>=2.8.0 (from fontmake->-r requirements.txt (line 2))
Downloading https://files.pythonhosted.org/packages/73/79/7e68ae92051ab1c8941a866bd4883dd53466794992097b385e2572785f7d/ufo2ft-2.8.0.zip (198kB)
|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 204kB 15.7MB/s
Requirement already satisfied: certifi>=2017.4.17 in ./venv/lib/python3.7/site-packages (from requests==2.21.0->-r requirements.txt (line 5)) (2019.3.9)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in ./venv/lib/python3.7/site-packages (from requests==2.21.0->-r requirements.txt (line 5)) (3.0.4)
Requirement already satisfied: pytz in ./venv/lib/python3.7/site-packages (from fs->-r requirements.txt (line 7)) (2019.1)
Requirement already satisfied: six~=1.10 in ./venv/lib/python3.7/site-packages (from fs->-r requirements.txt (line 7)) (1.12.0)
Requirement already satisfied: appdirs~=1.4.3 in ./venv/lib/python3.7/site-packages (from fs->-r requirements.txt (line 7)) (1.4.3)
Requirement already satisfied: sphinx>=1.4 in ./venv/lib/python3.7/site-packages (from fontbakery>=0.7.0->-r requirements.txt (line 8)) (2.0.1)
Requirement already satisfied: opentype-sanitizer>=7.1.9 in ./venv/lib/python3.7/site-packages (from fontbakery>=0.7.0->-r requirements.txt (line 8)) (7.1.9)
Requirement already satisfied: ttfautohint-py in ./venv/lib/python3.7/site-packages (from fontbakery>=0.7.0->-r requirements.txt (line 8)) (0.4.3)
Requirement already satisfied: recommonmark in ./venv/lib/python3.7/site-packages (from fontbakery>=0.7.0->-r requirements.txt (line 8)) (0.5.0)
Requirement already satisfied: ufolint in ./venv/lib/python3.7/site-packages (from fontbakery>=0.7.0->-r requirements.txt (line 8)) (0.3.5)
Requirement already satisfied: font-v in ./venv/lib/python3.7/site-packages (from fontbakery>=0.7.0->-r requirements.txt (line 8)) (0.7.1)
Requirement already satisfied: beautifulsoup4 in ./venv/lib/python3.7/site-packages (from fontbakery>=0.7.0->-r requirements.txt (line 8)) (4.7.1)
Requirement already satisfied: sphinx-rtd-theme in ./venv/lib/python3.7/site-packages (from fontbakery>=0.7.0->-r requirements.txt (line 8)) (0.4.3)
Collecting Werkzeug>=0.14 (from Flask->gftools==0.2.0->-r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/f3/c8/fa7e1a0283267bee8efa10c665d8dca27e591face7e333c789c85671b3ab/Werkzeug-0.15.2.tar.gz (925kB)
|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 931kB 19.2MB/s
Requirement already satisfied: Jinja2>=2.10 in ./venv/lib/python3.7/site-packages (from Flask->gftools==0.2.0->-r requirements.txt (line 10)) (2.10.1)
Collecting itsdangerous>=0.24 (from Flask->gftools==0.2.0->-r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/68/1a/f27de07a8a304ad5fa817bbe383d1238ac4396da447fa11ed937039fa04b/itsdangerous-1.1.0.tar.gz (53kB)
|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 61kB 34.5MB/s
Collecting click>=5.1 (from Flask->gftools==0.2.0->-r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/f8/5c/f60e9d8a1e77005f664b76ff8aeaee5bc05d0a91798afd7f53fc998dbc47/Click-7.0.tar.gz (286kB)
|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 286kB 23.7MB/s
Collecting pycairo>=1.18.0 (from fontdiffenator->gftools==0.2.0->-r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/48/20/5e83af98eb897935bf7dc39455e892ba866feebb9b7c3b392982866f9958/pycairo-1.18.1.tar.gz (200kB)
|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 204kB 23.3MB/s
Collecting uharfbuzz>=0.3.0 (from fontdiffenator->gftools==0.2.0->-r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/91/c1/b239da62d17815a11e4aeeb8a7832469e86fa3d824627f3eb83146fe7be0/uharfbuzz-0.5.0.zip
Installing build dependencies ... error
ERROR: Complete output from command /Users/stephennixon/type-repos/google-font-repos/Encode-Sans/venv/bin/python3 /Users/stephennixon/type-repos/google-font-repos/Encode-Sans/venv/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/sr/fzxs628x5gbgjtwscngjdcqh0000gn/T/pip-build-env-10kz8xkq/overlay --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple -- 'setuptools >= 36.4' wheel 'setuptools_scm >= 2.1' 'cython >= 0.28.1' 'scikit-build >= 0.9.0' cmake ninja:
ERROR: Collecting setuptools>=36.4
Using cached https://files.pythonhosted.org/packages/1d/64/a18a487b4391a05b9c7f938b94a16d80305bf0369c6b0b9509e86165e1d3/setuptools-41.0.1.zip
Collecting wheel
Using cached https://files.pythonhosted.org/packages/aa/ce/bd5f6133683a357462c39554b771d90315319300afade7496c9b96fedb05/wheel-0.33.3.tar.gz
Collecting setuptools_scm>=2.1
Using cached https://files.pythonhosted.org/packages/90/5d/a822911555aad367f24c3fd3019619b2906fc6aa52cc1784b8902d880c20/setuptools_scm-3.3.1.tar.gz
Collecting cython>=0.28.1
Using cached https://files.pythonhosted.org/packages/f8/da/c979464858b257b21a6472a85285548c91f5b4dc773cb049cfdfb3ceeb02/Cython-0.29.7.tar.gz
Collecting scikit-build>=0.9.0
Using cached https://files.pythonhosted.org/packages/bb/48/412c5f3fb48364caa8e339d8e84dd2706c75b82d80df377353deecb5b2dc/scikit-build-0.9.0.tar.gz
Collecting cmake
Using cached https://files.pythonhosted.org/packages/72/7b/8d3d83f884283ddfc86ca407d10152d66b84dff5baf5ed4537c127f988cb/cmake-3.13.3.tar.gz
ERROR: Complete output from command python setup.py egg_info:
ERROR: Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/sr/fzxs628x5gbgjtwscngjdcqh0000gn/T/pip-install-h2g82m1f/cmake/setup.py", line 7, in <module>
from skbuild import setup
ModuleNotFoundError: No module named 'skbuild'
----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/sr/fzxs628x5gbgjtwscngjdcqh0000gn/T/pip-install-h2g82m1f/cmake/
----------------------------------------
ERROR: Command "/Users/stephennixon/type-repos/google-font-repos/Encode-Sans/venv/bin/python3 /Users/stephennixon/type-repos/google-font-repos/Encode-Sans/venv/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/sr/fzxs628x5gbgjtwscngjdcqh0000gn/T/pip-build-env-10kz8xkq/overlay --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple -- 'setuptools >= 36.4' wheel 'setuptools_scm >= 2.1' 'cython >= 0.28.1' 'scikit-build >= 0.9.0' cmake ninja" failed with error code 1 in None
fontforge module is coming from a brew install of fontforge command line tools
Interesting! It is coming from a brew install. So, maybe that was triggering the issue once pip installed the old FontBakery.
I have a suspicion this might be coming from my installing Python or Pip in a slightly-wrong way.
What resource would you follow to install Python on a fresh system?
Your python (=Py2.7 on macOS with homebrew install) and python3 (=Py3 on macOS with homebrew install) should be OK. As I understand the Ruby script, homebrew seems to only install the Python fontforge module under Py2? I can verify that I installed fontforge with homebrew and it is installed on my system under Py2.7 too. That is why the exception is being raised with a Py3 FB install. There is no Py3 fontforge Python module to import. I think that Felipe's point above is that some exception handling must have been included since the very early release that your pip install from cache is trying to use (v.0.0.13 of fontbakery). When a newer FB version is installed, this exception should be handled (if the above is a correct assumption) and your install with the requirements.txt file should complete without issues. I don't understand why pip is hung up with a cached version of a very old fontbakery release. My only thought there is to modify the requirements.txt file to push the fontbakery version to something higher (see https://github.com/googlefonts/fontbakery/issues/2497#issuecomment-491396606)
@chrissimpkins thanks for the detailed response!
Yeah, it seems that calling a specific version of Fontbakery helped me avoid that issue. But, now that I'm getting a similar issue with a different module, it leads me to believe that perhaps, I somehow set up pip incorrectly.
From my notes on setup:
Python3
I followed these instructions to use Homebrew to install Python 3.
I then checked that it worked in a command line with python3 --version, and it returned Python 3.7.3.
Pip3
However, I wanted pip3 to be called with the command pip. So, I downloaded pip from the pip docs, then used python3 get-pip.py. With that, pip --version returned pip 19.1.1 from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip.
An important thing to remember is that fontbakery does not require fontforge anymore since the latest release from last week.
Most helpful comment
I think that this may be due to the fact that the Python
fontforgemodule is coming from abrew installof fontforge command line tools (not from pip3 where it doesn't exist/is not distributed). Looking at the Homebrew Ruby formula for fontforge, it seems that the Python module that it installs is Py2 only. Your Py3 venv can't import it. The old FB version doesn't handle the fontforge import exception and chokes...I think :)