MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.31k stars 21.49k forks source link

"az extension add -n db-up" Not Working Pip Exit 1 #88772

Closed barryguglielmo closed 2 years ago

barryguglielmo commented 2 years ago

Hi There,

I installed the azure cli (2.33.1) on my mac (Monterey 12.2.1) using homebrew (3.3.16-55-g377ac64) using anaconda virtual env with python 3.10.0 and I continue to get the error message stated below when running az extension add -n db-up. In short, pip has an issue installing pymysql and claims that there is a missing file "sqlfront.h". I tried installing pymysql with my own pip install and it installed fine, but it did not resolve the error when re running the az command.

How can I resolve this?

` Building wheel for pymssql (pyproject.toml): started Running command Building wheel for pymssql (pyproject.toml) setup.py: platform.system() => Darwin setup.py: platform.architecture() => ('64bit', '') setup.py: platform.libc_ver() => ('', '') setup.py: include_dirs => [] setup.py: library_dirs => [] running bdist_wheel running build running build_py creating build creating build/lib.macosx-10.9-x86_64-3.10 creating build/lib.macosx-10.9-x86_64-3.10/pymssql copying src/pymssql/init.py -> build/lib.macosx-10.9-x86_64-3.10/pymssql running build_ext cythoning src/pymssql/_mssql.pyx to src/pymssql/_mssql.c cythoning src/pymssql/_pymssql.pyx to src/pymssql/_pymssql.c building 'pymssql._mssql' extension creating build/temp.macosx-10.9-x86_64-3.10 creating build/temp.macosx-10.9-x86_64-3.10/src creating build/temp.macosx-10.9-x86_64-3.10/src/pymssql clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/miniconda3/envs/datahound/include -fPIC -O2 -isystem /opt/miniconda3/envs/datahound/include -I/opt/miniconda3/envs/datahound/include/python3.10 -c src/pymssql/_mssql.c -o build/temp.macosx-10.9-x86_64-3.10/src/pymssql/_mssql.o -DMSDBLIB src/pymssql/_mssql.c:688:10: fatal error: 'sqlfront.h' file not found

include "sqlfront.h"

       ^~~~~~~~~~~~

1 error generated. error: command '/usr/bin/clang' failed with exit code 1 error: subprocess-exited-with-error

× Building wheel for pymssql (pyproject.toml) 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. full command: /opt/miniconda3/envs/datahound/bin/python /opt/miniconda3/envs/datahound/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /var/folders/c7/rj443xgj46ggvlhqbbzb71kr0000gn/T/tmpa2g17dcy cwd: /private/var/folders/c7/rj443xgj46ggvlhqbbzb71kr0000gn/T/pip-install-l35mkf1k/pymssql_b36aae5e3b0a4cb9ae426046ea729f24 Building wheel for pymssql (pyproject.toml): finished with status 'error' ERROR: Failed building wheel for pymssql Failed to build pymssql ERROR: Could not build wheels for pymssql, which is required to install pyproject.toml-based projects `

barryguglielmo commented 2 years ago

I figured it out. I needed to brew install freetds

This might be a good piece to add to the docs