Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to install on macOS 10.15.4 #16

Open
poke1024 opened this issue Apr 2, 2020 · 6 comments
Open

Fails to install on macOS 10.15.4 #16

poke1024 opened this issue Apr 2, 2020 · 6 comments
Assignees
Labels

Comments

@poke1024
Copy link

poke1024 commented Apr 2, 2020

pip install pyvoronoi gives the following error:

Collecting pyvoronoi
  Using cached pyvoronoi-1.0.5.tar.gz (133 kB)
Building wheels for collected packages: pyvoronoi
  Building wheel for pyvoronoi (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /opt/miniconda3/envs/calamari-tf1/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/m6/3kr1nz2x29qdczpm2q_8n5m40000gr/T/pip-install-9onxfsxm/pyvoronoi/setup.py'"'"'; __file__='"'"'/private/var/folders/m6/3kr1nz2x29qdczpm2q_8n5m40000gr/T/pip-install-9onxfsxm/pyvoronoi/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/m6/3kr1nz2x29qdczpm2q_8n5m40000gr/T/pip-wheel-__apdo5b
       cwd: /private/var/folders/m6/3kr1nz2x29qdczpm2q_8n5m40000gr/T/pip-install-9onxfsxm/pyvoronoi/
  Complete output (15 lines):
  Distribution mode: Compiling Cython generated .cpp sources.
  running bdist_wheel
  running build
  running build_ext
  building 'pyvoronoi' extension
  creating build
  creating build/temp.macosx-10.7-x86_64-3.6
  creating build/temp.macosx-10.7-x86_64-3.6/pyvoronoi
  gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/miniconda3/envs/calamari-tf1/include -arch x86_64 -I/opt/miniconda3/envs/calamari-tf1/include -arch x86_64 -Ipyvoronoi -I/opt/miniconda3/envs/calamari-tf1/include/python3.6m -c pyvoronoi/pyvoronoi.cpp -o build/temp.macosx-10.7-x86_64-3.6/pyvoronoi/pyvoronoi.o
  clang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
  pyvoronoi/pyvoronoi.cpp:250:10: fatal error: 'vector' file not found
  #include <vector>
           ^~~~~~~~
  1 error generated.
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for pyvoronoi
  Running setup.py clean for pyvoronoi
Failed to build pyvoronoi
Installing collected packages: pyvoronoi
    Running setup.py install for pyvoronoi ... error
    ERROR: Command errored out with exit status 1:
     command: /opt/miniconda3/envs/calamari-tf1/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/m6/3kr1nz2x29qdczpm2q_8n5m40000gr/T/pip-install-9onxfsxm/pyvoronoi/setup.py'"'"'; __file__='"'"'/private/var/folders/m6/3kr1nz2x29qdczpm2q_8n5m40000gr/T/pip-install-9onxfsxm/pyvoronoi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/m6/3kr1nz2x29qdczpm2q_8n5m40000gr/T/pip-record-ef070gan/install-record.txt --single-version-externally-managed --compile --install-headers /opt/miniconda3/envs/calamari-tf1/include/python3.6m/pyvoronoi
         cwd: /private/var/folders/m6/3kr1nz2x29qdczpm2q_8n5m40000gr/T/pip-install-9onxfsxm/pyvoronoi/
    Complete output (15 lines):
    Distribution mode: Compiling Cython generated .cpp sources.
    running install
    running build
    running build_ext
    building 'pyvoronoi' extension
    creating build
    creating build/temp.macosx-10.7-x86_64-3.6
    creating build/temp.macosx-10.7-x86_64-3.6/pyvoronoi
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/miniconda3/envs/calamari-tf1/include -arch x86_64 -I/opt/miniconda3/envs/calamari-tf1/include -arch x86_64 -Ipyvoronoi -I/opt/miniconda3/envs/calamari-tf1/include/python3.6m -c pyvoronoi/pyvoronoi.cpp -o build/temp.macosx-10.7-x86_64-3.6/pyvoronoi/pyvoronoi.o
    clang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
    pyvoronoi/pyvoronoi.cpp:250:10: fatal error: 'vector' file not found
    #include <vector>
             ^~~~~~~~
    1 error generated.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /opt/miniconda3/envs/calamari-tf1/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/m6/3kr1nz2x29qdczpm2q_8n5m40000gr/T/pip-install-9onxfsxm/pyvoronoi/setup.py'"'"'; __file__='"'"'/private/var/folders/m6/3kr1nz2x29qdczpm2q_8n5m40000gr/T/pip-install-9onxfsxm/pyvoronoi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/m6/3kr1nz2x29qdczpm2q_8n5m40000gr/T/pip-record-ef070gan/install-record.txt --single-version-externally-managed --compile --install-headers /opt/miniconda3/envs/calamari-tf1/include/python3.6m/pyvoronoi Check the logs for full command output.

The fix is to run CFLAGS="-stdlib=libc++" pip install pyvoronoi.

@poke1024
Copy link
Author

poke1024 commented Apr 5, 2020 via email

@fabanc fabanc added the bug label Jan 6, 2024
@fabanc
Copy link
Owner

fabanc commented Jan 6, 2024

I have done a few fix on the API. The fix have been tested on Windows on Ubuntu. Does it fix anything for you?

@bulatbulat48
Copy link

bulatbulat48 commented Jun 26, 2024

@fabanc I have faced the error with MacOS: 14.3.1.
Tested on python 3.11, 3.10.

Building wheels for collected packages: pyvoronoi
  Building wheel for pyvoronoi (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for pyvoronoi (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [164 lines of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyvoronoi
Failed to build pyvoronoi
ERROR: Could not build wheels for pyvoronoi, which is required to install pyproject.toml-based projects

fixed as mentioned here:

 env CXX=/opt/homebrew/Cellar/gcc/14.1.0_1/bin/g++-14 CC=/opt/homebrew/Cellar/gcc/14.1.0_1/bin/gcc-14 pip install pyvoronoi

@fabanc fabanc self-assigned this Jun 29, 2024
@fabanc
Copy link
Owner

fabanc commented Jun 29, 2024

Sounds good. It is something I can add in the setup.py file. I am currently working on building the wheels on most OS using cibuildwheel. I am hopping it will:

  • Allow me to reproduce issues on MACOS
  • Remove the pain on building wheels for end user by generating them on each release.

I have been on that on and off over the past 2 months. The builds can now be generated from Python 3.9 to 3.12 on Windows, Ubuntu, and MacOS.

I am working on pushing those automatically to pypi. Stay tuned.

@fabanc
Copy link
Owner

fabanc commented Jun 30, 2024

@bulatbulat48 Using cibuildwheel, I can now generate the wheels for Mac OS. I have pushed those wheels as part of the latest release 1.1.4. Care to give it a try using pypi and see if this solves that problem for you?

@thatch
Copy link
Contributor

thatch commented Dec 27, 2024

I'm fairly confident this should work now from binary wheels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants