I am as new as it get's to programming. I am trying to access the ChatGPT API to write a bachelor thesis. I am on Mac 12.5.1, using Python 3.8.12 (trying at least).
I need to execute a curl command in Python. I tried to install pycurl via pip. Every time I execute the command I get an Error message: ERROR: Failed building wheel for pycurl.(More below)
I did install brew on chatgpts recommendation and verified my curl version with it: curl: stable 8.2.0 (bottled), HEAD [keg-only]
In the process of following the internets suggestion did install Xcode. My understanding is that I do need openssl, so I checked that too (with brew): openssl@3: stable 3.1.1 (bottled)
That's what happens, if I try to install pycurl:
pip install pycurl
Collecting pycurl
Using cached pycurl-7.45.2.tar.gz (234 kB)
Preparing metadata (setup.py) ... e
uilding wheels for collected packages: pycurl
Building wheel for pycurl (setup.py) ... [?25lerror
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [20 lines of output]
Using curl-config (libcurl 7.79.1)
Warning: libcurl is configured to use SSL, but we have not been able to determine which SSL backend it is using. If your Curl is built against OpenSSL, LibreSSL, BoringSSL, GnuTLS, NSS, mbedTLS, or Secure Transport please specify the SSL backend manually. For other SSL backends please ignore this message.Not using an SSL library
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-cpython-38
creating build/lib.macosx-10.9-x86_64-cpython-38/curl
copying python/curl/__init__.py -> build/lib.macosx-10.9-x86_64-cpython-38/curl
running build_ext
building 'pycurl' extension
creating build/temp.macosx-10.9-x86_64-cpython-38
creating build/temp.macosx-10.9-x86_64-cpython-38/src
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -mmacosx-version-min=10.9 -Wno-nullability-completeness -Wno-expansion-to-defined -Wno-undef-prefix -fPIC -I/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpx6347iwh/tools/deps/include -I/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpx6347iwh/tools/deps/include/ncursesw -I/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpx6347iwh/tools/deps/include/uuid -Werror=unguarded-availability-new -DPYCURL_VERSION=\"7.45.2\" -DHAVE_CURL_SSL=1 "-I/Users/-----------/Library/Application Support/mu/mu_venv-38-20230716-163918/include" -I/install/include/python3.8 -c src/docstrings.c -o build/temp.macosx-10.9-x86_64-cpython-38/src/docstrings.o
In file included from src/docstrings.c:4:
src/pycurl.h:5:10: fatal error: 'Python.h' file not found
#include <Python.h>
^~~~~~~~~~
1 error generated.
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 pycurl
nning setup.py clean for pycurl
Failed to build pycurl
ERROR: Could not build wheels for pycurl, which is required to install pyproject.toml-based projects
Note: you may need to restart the kernel to use updated packages.
It says I have to specify which SSL I am using, but I am still excited to use the terminal so that's just way above my league. Any Help is appreciated!