You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If odbc_config isn't found in the user's PATH, readlines() won't unpack anything and a ValueError will be raised. This issue is likely often to occur when a user is attempting to install pyodbc where it unfortunately produces an unhelpful error:
(example) RA80533@mbp example % python -m pip install --pre --no-binary :all: pyodbcCollecting pyodbc Using cached pyodbc-4.0.39.tar.gz (282 kB) Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [20 lines of output] Traceback (most recent call last): File "/Users/RA80533/Desktop/example/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module> main() File "/Users/RA80533/Desktop/example/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/RA80533/Desktop/example/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel return hook(config_settings) ^^^^^^^^^^^^^^^^^^^^^ File "/private/var/folders/rx/mgpqyfxd01q4w5yhxdctdfcm0000gn/T/pip-build-env-b_hshvm7/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=['wheel']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/private/var/folders/rx/mgpqyfxd01q4w5yhxdctdfcm0000gn/T/pip-build-env-b_hshvm7/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires self.run_setup() File "/private/var/folders/rx/mgpqyfxd01q4w5yhxdctdfcm0000gn/T/pip-build-env-b_hshvm7/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 338, in run_setup exec(code, locals()) File "<string>", line 371, in <module> File "<string>", line 77, in main File "<string>", line 205, in get_compiler_settings ValueError: not enough values to unpack (expected 2, got 0) [end of output] note: This error originates from a subprocess, and is likely not a problem with pip.error: subprocess-exited-with-error× Getting requirements to build wheel did not run successfully.│ exit code: 1╰─> See above for output.note: This error originates from a subprocess, and is likely not a problem with pip.
The text was updated successfully, but these errors were encountered:
Issue
setup.py attempts to run
odbc_config
in the user's shell viaos.popen()
:pyodbc/setup.py
Line 204 in 7b4e277
It then calls
readlines()
and assumes there will be at least 2 values to unpack and assign tocflags
andldflags
:pyodbc/setup.py
Line 205 in 7b4e277
If
odbc_config
isn't found in the user's PATH,readlines()
won't unpack anything and a ValueError will be raised. This issue is likely often to occur when a user is attempting to install pyodbc where it unfortunately produces an unhelpful error:The text was updated successfully, but these errors were encountered: