Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation error reported #3970

Closed
vv-monsalve opened this issue Nov 30, 2022 · 29 comments
Closed

Installation error reported #3970

vv-monsalve opened this issue Nov 30, 2022 · 29 comments

Comments

@vv-monsalve
Copy link
Collaborator

Describe the issue
A metadata-generation-failed error was reported during installation under a new venv

To Reproduce
Create a new venv, update pip (Successfully uninstalled pip-22.3) and run the pip install fontbakery command

Attaching here the complete report.
FB-installation-ERROR-messages.rtf.zip

@miguelsousa
Copy link
Contributor

miguelsousa commented Nov 30, 2022

I've ran into this as well. The problem seems to be coming from the kurbopy dependency.
Bellow is the result when running this simple install command on a new Python 3.9.12 environment,

pip install fontbakery
Collecting kurbopy>=0.8.32
  Downloading kurbopy-0.8.32.tar.gz (1.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.3/1.3 MB 9.0 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      
      Cargo, the Rust package manager, is not installed or is not on PATH.
      This package requires Rust and Cargo to compile extensions. Install it through
      the system's package manager or via https://rustup.rs/
      
      Checking for Rust toolchain....
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

@miguelsousa
Copy link
Contributor

miguelsousa commented Nov 30, 2022

@simoncozens any ideas of what may be going on?

@miguelsousa
Copy link
Contributor

Looking at the available wheels of the latest version of kurbopy I see that for the Mac platform the only wheel available is for Python 3.10 on arm64 architecture. This is a big problem.

@simoncozens Are you able to add the missing wheels for MacOS? Font Bakery is supposed to support all the 3 major platforms, from Python 3.7 onward.

@colinmford
Copy link

Seeing this as well — I was installing with Python 3.11, albeit on an Intel mac. I had to install rustup to get around it — certainly not ideal at all.

@miguelsousa
Copy link
Contributor

@colinmford thanks for the input

@simoncozens
Copy link
Collaborator

Yep, sorry; I thought I had uploaded all the architectures but obviously not for that version. Will fix.

@miguelsousa
Copy link
Contributor

Thank you!

@miguelsousa
Copy link
Contributor

@simoncozens What's the dependency that requires kurbopy? The macOS builds didn't fail, but they also didn't install kurbopy.

@simoncozens
Copy link
Collaborator

The shaper profile requires collidoscope, which (now) requires kurbopy.

@simoncozens
Copy link
Collaborator

Mac OS x86 wheel now uploaded.

@simoncozens
Copy link
Collaborator

And I've just uploaded a bunch of universal wheels, which should cover M1 on other Python versions.

@JamieClarkeType
Copy link

I'm seeing this as well, just now. Python 3.11 Intel Mac. Should I install rustup or wait for fix?

@simoncozens
Copy link
Collaborator

Give me a sec, I didn't even know there was a Python 3.11. I'll add it to the build matrix.

@JamieClarkeType
Copy link

Thank you Simon. No urgency from me!

@simoncozens
Copy link
Collaborator

Should be there now.

@JamieClarkeType
Copy link

Thanks Simon. I'm getting this error now:

running build_ext
building 'lxml.etree' extension
creating build/temp.macosx-10.9-universal2-cpython-311
creating build/temp.macosx-10.9-universal2-cpython-311/src
creating build/temp.macosx-10.9-universal2-cpython-311/src/lxml
clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -DCYTHON_CLINE_IN_TRACEBACK=0 -I/usr/include -Isrc -Isrc/lxml/includes -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c src/lxml/etree.c -o build/temp.macosx-10.9-universal2-cpython-311/src/lxml/etree.o -w -flat_namespace
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Compile failed: command '/usr/bin/clang' failed with exit code 1
creating var
creating var/folders
creating var/folders/ds
creating var/folders/ds/53wr35kx6g38qqmqgj1vc21c0000gn
creating var/folders/ds/53wr35kx6g38qqmqgj1vc21c0000gn/T
cc -I/usr/include -I/usr/include/libxml2 -c /var/folders/ds/53wr35kx6g38qqmqgj1vc21c0000gn/T/xmlXPathInitcia2lmb8.c -o var/folders/ds/53wr35kx6g38qqmqgj1vc21c0000gn/T/xmlXPathInitcia2lmb8.o
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
*********************************************************************************
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
Perhaps try: xcode-select --install
*********************************************************************************
error: command '/usr/bin/clang' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> lxml

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

[notice] A new release of pip available: 22.3 -> 22.3.1
[notice] To update, run: pip3 install --upgrade pip

@simoncozens
Copy link
Collaborator

That one's not me (building the lxml library). This is another area where there should be a binary wheel but it looks like there isn't one released for 3.11 yet. You need Xcode installed at least to build it from source, then follow https://lxml.de/build.html#building-lxml-on-macos-x

@JamieClarkeType
Copy link

Will do. Thanks

@miguelsousa
Copy link
Contributor

The shaper profile requires collidoscope, which (now) requires kurbopy.

Sorry, it's still unclear to me what makes kurbopy to be installed.
Is it because of a particular version of a primary Font Bakery dependency?
Is it because of a Font Bakery setting?

@simoncozens
Copy link
Collaborator

Sorry, it's still unclear to me what makes kurbopy to be installed.

Collidoscope is a primary dependency of fontbakery because fontbakery.profiles.shaping imports collidoscope:

https://github.com/googlefonts/fontbakery/blob/cc9195912eecfa9a965db885d30a4ab4f33b5b79/Lib/fontbakery/profiles/shaping.py#L29

Kurbopy is a primary dependency of collidoscope because collidoscope imports kurbopy:

https://github.com/simoncozens/collidoscope/blob/master/Lib/collidoscope/__init__.py#L7

@JamieClarkeType
Copy link

This is all a little over my head. Is there an easier way to use Font Bakery without in-depth programming knowledge?

@miguelsousa
Copy link
Contributor

@simoncozens thanks, that helped.
To summarize: The CI isn't failing because it installs collidoscope v0.4.1, whereas Font Bakery's general installation is not pinned to that version; this meant that a later version of collidoscope was used, which has the kurbopy dependency.

@miguelsousa
Copy link
Contributor

Is there an easier way to use Font Bakery without in-depth programming knowledge?

Using Font Bakery is not complicated. (Here's a brief manual in case it helps). What sometimes gets in the way is the state of Font Bakery's external dependencies. I believe that Font Bakery's default installation is overbloated; reducing the dependencies that get installed by default will make the lives of the general Font Bakery user a lot easier.
In your case, you're also using a very new version of Python, which not all dependencies are ready to support yet.

@JamieClarkeType
Copy link

Thanks Miguel.
I'll see if I can roll back a few versions of Python

@miguelsousa
Copy link
Contributor

@simoncozens This problem is still happening on Windows. Please add the missing wheels for Windows (e.g. Python 3.9).

felipesanches added a commit that referenced this issue Dec 6, 2022
Still too early for that. Let's activate this once the problems described at #3970 are sorted out.
felipesanches added a commit that referenced this issue Dec 6, 2022
Still too early for that. Let's activate this once the problems described at #3970 are sorted out.
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Dec 6, 2022
to sort out issue that was not allowing users to install fontbakery on
python 3.11
(issue fonttools#3970)
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Dec 6, 2022
to sort out issue that was not allowing users to install fontbakery on
python 3.11
(issue fonttools#3970)
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Dec 8, 2022
to sort out issue that was not allowing users to install fontbakery on
python 3.11
(issue fonttools#3970)
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Dec 17, 2022
to sort out issue that was not allowing users to install fontbakery on
python 3.11
(issue fonttools#3970)
@JamieClarkeType
Copy link

Hi, I tried installing again today since FB updates.
I got this error, any ideas?:

DEPRECATION: lxml is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at pypa/pip#8559
Running setup.py install for lxml ... error
error: subprocess-exited-with-error

× Running setup.py install for lxml did not run successfully.
│ exit code: 1
╰─> [121 lines of output]

@simoncozens
Copy link
Collaborator

the 'wheel' package is not installed.

That may be your problem. Do pip install wheel and try again.

@JamieClarkeType
Copy link

Thanks @simoncozens
I did that, then got this, (still something missing on my end?):
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
*********************************************************************************
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
Perhaps try: xcode-select --install
*********************************************************************************
error: command '/usr/bin/clang' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> lxml

felipesanches added a commit to felipesanches/fontbakery that referenced this issue Jan 20, 2023
to sort out issue that was not allowing users to install fontbakery on
python 3.11
(issue fonttools#3970)
@madig
Copy link
Contributor

madig commented Feb 28, 2023

kurbopy 0.9.0 ships with binary wheels for macOS, Windows and Linux for all Python versions >= 3.7, so hopefully this is solved now.

felipesanches added a commit to felipesanches/fontbakery that referenced this issue Feb 28, 2023
to sort out issue that was not allowing users to install fontbakery on
python 3.11
(issue fonttools#3970)
felipesanches added a commit to felipesanches/fontbakery that referenced this issue Mar 3, 2023
to sort out issue that was not allowing users to install fontbakery on
python 3.11
(issue fonttools#3970)
felipesanches added a commit that referenced this issue Mar 3, 2023
to sort out issue that was not allowing users to install fontbakery on
python 3.11
(issue #3970)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants