Running "lk agent deploy" leads to following error...
# ask-ai
l
Running "lk agent deploy" leads to following error: Building wheels for collected packages: annoy 23.19 Building wheel for annoy (setup.py): started 23.89 Building wheel for annoy (setup.py): finished with status 'error' 23.89 error: subprocess-exited-with-error 23.89 23.89 × python setup.py bdist_wheel did not run successfully. 23.89 │ exit code: 1 23.89 ╰─> [19 lines of output] 23.89 /usr/local/lib/python3.11/site-packages/setuptools/installer.py27 SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer. 23.89 warnings.warn( 23.89 running bdist_wheel 23.89 running build 23.89 running build_py 23.89 creating build 23.89 creating build/lib.linux-x86_64-cpython-311 23.89 creating build/lib.linux-x86_64-cpython-311/annoy 23.89 copying annoy/__init__.py -> build/lib.linux-x86_64-cpython-311/annoy 23.89 copying annoy/__init__.pyi -> build/lib.linux-x86_64-cpython-311/annoy 23.89 copying annoy/py.typed -> build/lib.linux-x86_64-cpython-311/annoy 23.89 running build_ext 23.89 building 'annoy.annoylib' extension 23.89 creating build/temp.linux-x86_64-cpython-311 23.89 creating build/temp.linux-x86_64-cpython-311/src 23.89 gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.11 -c src/annoymodule.cc -o build/temp.linux-x86_64-cpython-311/src/annoymodule.o -D_CRT_SECURE_NO_WARNINGS -fpermissive -march=native -O3 -ffast-math -fno-associative-math -DANNOYLIB_MULTITHREADED_BUILD -std=c++14 23.89 gcc: fatal error: cannot execute ‘cc1plus’: execvp: No such file or directory 23.89 compilation terminated. 23.89 error: command '/usr/bin/gcc' failed with exit code 1 23.89 [end of output] 23.89 23.89 note: This error originates from a subprocess, and is likely not a problem with pip. 23.89 ERROR: Failed building wheel for annoy 23.90 Running setup.py clean for annoy 24.50 Failed to build annoy 24.50 ERROR: Could not build wheels for annoy, which is required to install pyproject.toml-based projects
t
Thanks for reaching out, Denis. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hey there! To get to the bottom of the issue with the 'annoy' package during deployment, could you share a bit more info? • Are you using the 'annoy' package directly in your agent code, or is it coming in through a dependency? • What platform or architecture are you deploying from? (Like Linux, macOS, or Windows?) • Have you had a chance to peek at the build logs using
lk agent logs --log-type=build
? If yes, did you notice anything interesting there? Once we have these details, we’ll be in a much better spot to figure out what’s going on and how to fix it. Thanks for sharing! Sources: Deploying to LiveKit Cloud | LiveKit Docs | requirements.txt | .github/workflows/build.yml | cmd/lk/agent.go
l
• Are you using the 'annoy' package directly in your agent code, or is it coming in through a dependency? no • What platform or architecture are you deploying from? (Like Linux, macOS, or Windows?) macOS
t
It looks like the error you're seeing means the C++ compiler toolchain isn’t quite set up right on your macOS. No worries though—here’s a simple way to fix it: 1. Install Xcode Command Line Tools: Just run this command to get the tools you need:
xcode-select --install
If you’ve already got them installed, try resetting the path with:
sudo xcode-select --reset
2. Check if the Compiler is Ready: You can see if the C++ compiler is there by running:
which g++
which clang++
gcc --version
3. Set Up Your Environment Right: Make sure your environment matches your Mac’s architecture:
uname -m
If you have Apple Silicon, run:
export ARCHFLAGS="-arch arm64"
For Intel Macs, use:
export ARCHFLAGS="-arch x86_64"
4. Install the Build Dependencies: Run this to get what you need:
pip install setuptools>=61.0 pybind11
5. Install CMake if You Need It: Some parts might need CMake, so you can install it with:
brew install cmake
If you’re still running into trouble after these steps, you might want to try reinstalling the Xcode Command Line Tools or using Homebrew GCC as a backup plan. Feel free to reach out if you want me to walk you through anything else or if new errors pop up—I’m here to help! Sources: livekit-plugins/livekit-plugins-browser/setup.py | .github/workflows/build-rtc.yml
l
gcc: fatal error: cannot execute ‘cc1plus’: execvp: No such file or directory
t
It looks like the error is happening because the C++ compiler isn’t quite set up right on your macOS. No worries—let’s walk through some easy steps to get this sorted out: 1. Install Xcode Command Line Tools: Just run:
xcode-select --install
If you’ve already got it installed, you can reset the path by running:
sudo xcode-select --reset
2. Check if the Compiler is Ready: To see if the C++ compiler is there, try:
which g++
which clang++
gcc --version
3. Use Homebrew GCC if Needed: If things still aren’t working, you can install GCC through Homebrew:
brew install gcc
After that, set the compiler environment variables like this:
export CC=gcc-13
export CXX=g++-13
Once you’ve gone through these steps, give the deployment command another shot. And if you hit any snags or see new errors, just let me know—I’m here to help!