1

I'm trying to install a python-package defined by pryproject.toml and setup.cfg file. I was able to install the package using `pip install .`` in Ubuntu 20.04.1 LTS. But I get the following error when I try install in python virtual environment (python 3.9) in Macbook with m1 chip.

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
      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: Failed building wheel for greenlet
  Building wheel for roundrobin (pyproject.toml) ... done
  Created wheel for roundrobin: filename=roundrobin-0.0.4-py3-none-any.whl size=4017 sha256=d7f7d00ddb6967eacd3f5cd086371e5ed2a4dc56017fcb1749750659544b49ef
  Stored in directory: /private/var/folders/mm/c7m9dm551_v9_4gdd1zbps9r0000gn/T/pip-ephem-wheel-cache-911t0hws/wheels/f0/a5/95/f5228e0966ecd65b54419065aefc1892af1fc06652fcb9f4d0
Successfully built cortex python-multipart databricks-cli Flask-BasicAuth roundrobin
Failed to build greenlet
ERROR: Could not build wheels for greenlet, which is required to install pyproject.toml-based projects
phd
  • 82,685
  • 13
  • 120
  • 165
Baenka
  • 243
  • 3
  • 15
  • Does this answer your question? [Error on "pip install -U channels" command using for otree (Running setup.py bdist\_wheel for twisted ... error)](https://stackoverflow.com/questions/47400675/error-on-pip-install-u-channels-command-using-for-otree-running-setup-py-bdi) – phd May 03 '23 at 07:42
  • https://stackoverflow.com/search?q=%5Bpip%5D+xcrun%3A+error%3A+invalid+active+developer+path+missing+xcrun – phd May 03 '23 at 07:42
  • @phd, yes the solution at https://stackoverflow.com/search?q=%5Bpip%5D+xcrun%3A+error%3A+invalid+active+developer+path+missing+xcrun answers my question too. Both question asked in my question as well in the other is not direct. The author of that stackoverflow question and myself did not even know the root problem was at xcrun. Maybe we need to rephrase the question correctly. – Baenka May 08 '23 at 10:03

2 Answers2

1

I got the some issue when i was trying to download Flask-SQLAlchemy, i used these code below in my terminal and it worked:

pip install --only-binary :all: greenlet

pip install --only-binary :all: Flask-SQLAlchemy

Python packages are often distributed as "wheels" (.whl files) which are pre-compiled binary packages. Try installing "greenlet" and "Flask-SQLAlchemy" using wheels instead of source distribution`

  • This worked for me when trying to install a library that depended on this. In my case, I use an M2 mac and greenlet made an assumption about my environment. A binary installation forces installation an already compiled version meant for M2Pro and I was able to install the library I needed – DFeng Aug 30 '23 at 15:49
-2

I resolved this issue in mac by installing the command line tools:

xcode-select --install

I followed the solution posted here.

Baenka
  • 243
  • 3
  • 15