简体   繁体   中英

Running setup.py install for regex ... error is driving me crazy

I am begging for help. I cannot get anything to work in anaconda anymore and I am trying to resolve it since days: I get the following error when I try to install several packages:

Building wheel for regex (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /opt/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/wc/1pgwt_g16sn0026xr90vh_x80000gn/T/pip-install-6dc2clpx/regex/setup.py'"'"'; __file__='"'"'/private/var/folders/wc/1pgwt_g16sn0026xr90vh_x80000gn/T/pip-install-6dc2clpx/regex/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/wc/1pgwt_g16sn0026xr90vh_x80000gn/T/pip-wheel-r01lufl5
       cwd: /private/var/folders/wc/1pgwt_g16sn0026xr90vh_x80000gn/T/pip-install-6dc2clpx/regex/
  Complete output (17 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.9-x86_64-3.7
  creating build/lib.macosx-10.9-x86_64-3.7/regex
  copying regex_3/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/regex
  copying regex_3/regex.py -> build/lib.macosx-10.9-x86_64-3.7/regex
  copying regex_3/_regex_core.py -> build/lib.macosx-10.9-x86_64-3.7/regex
  copying regex_3/test_regex.py -> build/lib.macosx-10.9-x86_64-3.7/regex
  running build_ext
  building 'regex._regex' extension
  creating build/temp.macosx-10.9-x86_64-3.7
  creating build/temp.macosx-10.9-x86_64-3.7/regex_3
  gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/anaconda3/include -arch x86_64 -I/opt/anaconda3/include -arch x86_64 -I/opt/anaconda3/include/python3.7m -c regex_3/_regex.c -o build/temp.macosx-10.9-x86_64-3.7/regex_3/_regex.o
  xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for regex

I tried everything. I uninstalled anaconda, I tried pip install regex NOTHING works. I am desperate. I cannot work since days. Please help me.

Make sure regex version is up to date in requirements.txt. For me it works when I set regex==2022.3.2.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM