簡體   English   中英

為正則表達式運行 setup.py install ...錯誤讓我發瘋

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

我乞求幫助。 我再也無法在 anaconda 中工作,並且從幾天以來我一直在嘗試解決它:當我嘗試安裝多個軟件包時出現以下錯誤:

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

我嘗試了一切。 我卸載了 anaconda,我嘗試pip install regex沒有任何效果。 生無可戀。 幾天以來我無法工作。 請幫我。

確保 requirements.txt 中的正則表達式版本是最新的。 對我來說,當我設置 regex==2022.3.2 時它會起作用。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM