errbotio / errbot

Errbot is a chatbot, a daemon that connects to your favorite chat service and bring your tools and some fun into the conversation.
http://errbot.io
GNU General Public License v3.0
3.13k stars 615 forks source link

Can't Install Errbot in Virtual Environment because of `dulwich` installation issue #1636

Closed areed1192 closed 1 year ago

areed1192 commented 1 year ago

Describe the bug I am unable to install errbot in a python 3.9 virtual environment. I get the following output:

Building wheels for collected packages: dulwich
  Building wheel for dulwich (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [293 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build

      running build_ext
      creating build/temp.macosx-10.9-x86_64-3.9
      creating build/temp.macosx-10.9-x86_64-3.9/dulwich
      gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/Users/alexreed/aws-rebuild-projects/it_bot/.errbot-ve/include -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c dulwich/_objects.c -o build/temp.macosx-10.9-x86_64-3.9/dulwich/_objects.o
      xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  Rolling back uninstall of dulwich

error: legacy-install-failure

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

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

To Reproduce

pip3 install --user virtualenv
virtualenv --python `which python3` ~/.errbot-ve
~/.errbot-ve/bin/pip install errbot

Expected behavior I expect the package errbot to be installed in the environment.

Environment (please complete the following information):

nzlosh commented 1 year ago

It looks like there's something wrong with the compiler environment, but I can't say for sure, I don't use mac.

      xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
      error: command '/usr/bin/gcc' failed with exit code 1
areed1192 commented 1 year ago

@nzlosh Interesting, I'll take a look and see if I can address the issue.

areed1192 commented 1 year ago

So, it looks like I had to reinstall Xcode. For those who run into this issue just run the following command from your terminal:

xcode-select --install

After that when I went to install errbot in the virtual environment it ran successfully.

areed1192 commented 1 year ago

So, it looks like I had to reinstall Xcode. For those who run into this issue just run the following command from your terminal:

xcode-select --install

After that when I went to install errbot in the virtual environment it ran successfully.