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 in Mac OSX, Python 3.11.4, pip 23.2.1 #30

Closed
yudataguy opened this issue Sep 27, 2023 · 4 comments
Closed

Installation error in Mac OSX, Python 3.11.4, pip 23.2.1 #30

yudataguy opened this issue Sep 27, 2023 · 4 comments

Comments

@yudataguy
Copy link

Building wheels for collected packages: magnetic
  Building wheel for magnetic (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for magnetic (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [32 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-13-arm64-cpython-311
      creating build/lib.macosx-13-arm64-cpython-311/magnetic
      copying magnetic/asyncore.py -> build/lib.macosx-13-arm64-cpython-311/magnetic
      copying magnetic/_version.py -> build/lib.macosx-13-arm64-cpython-311/magnetic
      copying magnetic/__init__.py -> build/lib.macosx-13-arm64-cpython-311/magnetic
      copying magnetic/_utils.py -> build/lib.macosx-13-arm64-cpython-311/magnetic
      creating build/lib.macosx-13-arm64-cpython-311/magnetic/_internals
      copying magnetic/_internals/inetd.py -> build/lib.macosx-13-arm64-cpython-311/magnetic/_internals
      copying magnetic/_internals/sane_fromfd.py -> build/lib.macosx-13-arm64-cpython-311/magnetic/_internals
      copying magnetic/_internals/systemd.py -> build/lib.macosx-13-arm64-cpython-311/magnetic/_internals
      copying magnetic/_internals/sane_fromfd_build.py -> build/lib.macosx-13-arm64-cpython-311/magnetic/_internals
      copying magnetic/_internals/__init__.py -> build/lib.macosx-13-arm64-cpython-311/magnetic/_internals
      copying magnetic/_internals/launchd.py -> build/lib.macosx-13-arm64-cpython-311/magnetic/_internals
      copying magnetic/_internals/sock_enums.py -> build/lib.macosx-13-arm64-cpython-311/magnetic/_internals
      UPDATING build/lib.macosx-13-arm64-cpython-311/magnetic/_version.py
      set build/lib.macosx-13-arm64-cpython-311/magnetic/_version.py to '0.1'
      running build_ext
      generating cffi module 'build/temp.macosx-13-arm64-cpython-311/magnetic._internals._sane_fromfd.c'
      creating build/temp.macosx-13-arm64-cpython-311
      building 'magnetic._internals._sane_fromfd' extension
      creating build/temp.macosx-13-arm64-cpython-311/build
      creating build/temp.macosx-13-arm64-cpython-311/build/temp.macosx-13-arm64-cpython-311
      clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -I/Users/samyu/Downloads/code/playground/magnetic-test/.venv/include -I/opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c build/temp.macosx-13-arm64-cpython-311/magnetic._internals._sane_fromfd.c -o build/temp.macosx-13-arm64-cpython-311/build/temp.macosx-13-arm64-cpython-311/magnetic._internals._sane_fromfd.o
      build/temp.macosx-13-arm64-cpython-311/magnetic._internals._sane_fromfd.c:592:51: error: use of undeclared identifier 'SO_PROTOCOL'
              int flag = getsockopt(sockfd, SOL_SOCKET, SO_PROTOCOL, &sockproto, &socklen);
                                                        ^
      1 error generated.
      error: command '/opt/homebrew/opt/llvm/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 magnetic
Failed to build magnetic
ERROR: Could not build wheels for magnetic, which is required to install pyproject.toml-based projects

Any suggestion on how to folve this?

@yudataguy
Copy link
Author

It works on my ubuntu 20.04, so probably macos centric issue

@jackmpcollins
Copy link
Owner

jackmpcollins commented Sep 27, 2023

@yudataguy It's a typo! This should work for you

pip install magentic

Thanks for trying out the package!

@yudataguy
Copy link
Author

@yudataguy It's a typo! This should work for you

pip install magentic

Thanks for trying out the package!

lol that's embarrassing. Here's another installation issue:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
aws-sam-cli 1.37.0 requires regex==2021.9.30, but you have regex 2023.6.3 which is incompatible.
aws-sam-cli 1.37.0 requires requests==2.25.1, but you have requests 2.30.0 which is incompatible.
aws-sam-cli 1.37.0 requires typing-extensions==3.10.0.0, but you have typing-extensions 4.8.0 which is incompatible.
langchainplus-sdk 0.0.4 requires pydantic<2,>=1, but you have pydantic 2.4.1 which is incompatible.
langchain 0.0.193 requires pydantic<2,>=1, but you have pydantic 2.4.1 which is incompatible.
confection 0.0.4 requires pydantic!=1.8,!=1.8.1,<1.11.0,>=1.7.4, but you have pydantic 2.4.1 which is incompatible.
thinc 8.1.10 requires pydantic!=1.8,!=1.8.1,<1.11.0,>=1.7.4, but you have pydantic 2.4.1 which is incompatible.
spacy 3.5.3 requires pydantic!=1.8,!=1.8.1,<1.11.0,>=1.7.4, but you have pydantic 2.4.1 which is incompatible.

is it possible to run magentic without langchain? I find langchain to be bloated, in the process of removing it entirely from my pipeline.

@jackmpcollins
Copy link
Owner

jackmpcollins commented Sep 27, 2023

Yes, magentic only depends on pydantic and openai but it requires pydantic v2 while the version of langchain you have requires pydantic v1. If you can upgrade your version of langchain to >=0.0.267 then you should be able to use both together (with pydantic v2 installed) according to this comment langchain-ai/langchain#6841 (comment)

You might need to also update some of the other packages mentioned in that error message for the same reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants