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

Failure to install using pip on mac #2484

Open
KristofferC opened this issue Dec 18, 2021 · 9 comments
Open

Failure to install using pip on mac #2484

KristofferC opened this issue Dec 18, 2021 · 9 comments
Labels
bug Something isn't working macOS python python wrappers
Milestone

Comments

@KristofferC
Copy link
Contributor

KristofferC commented Dec 18, 2021

I wanted to try out some of the Python examples but on a mac but upon trying to install via pip I get:

  build/temp.macosx-11-x86_64-3.9/_notcurses.c:570:14: fatal error: 'notcurses/direct.h' file not found
      #include <notcurses/direct.h>
Full error
$ pip3 install notcurses
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Collecting notcurses
  Using cached notcurses-3.0.1.tar.gz (66 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: cffi>=1.0.0 in /usr/local/lib/python3.9/site-packages (from notcurses) (1.15.0)
Requirement already satisfied: pycparser in /usr/local/lib/python3.9/site-packages (from cffi>=1.0.0->notcurses) (2.21)
Building wheels for collected packages: notcurses
  Building wheel for notcurses (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/opt/[email protected]/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/26/gw1dqz6n5zsbkp72mktkhz3c0000gn/T/pip-install-8_hvlogg/notcurses_0dfce11cef9742a8951ca6c7fb531250/setup.py'"'"'; __file__='"'"'/private/var/folders/26/gw1dqz6n5zsbkp72mktkhz3c0000gn/T/pip-install-8_hvlogg/notcurses_0dfce11cef9742a8951ca6c7fb531250/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/26/gw1dqz6n5zsbkp72mktkhz3c0000gn/T/pip-wheel-4i1it7_4
       cwd: /private/var/folders/26/gw1dqz6n5zsbkp72mktkhz3c0000gn/T/pip-install-8_hvlogg/notcurses_0dfce11cef9742a8951ca6c7fb531250/
  Complete output (31 lines):
  warning: pypandoc module not found, won't generate man pages
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-11-x86_64-3.9
  creating build/lib.macosx-11-x86_64-3.9/notcurses
  copying src/notcurses/__init__.py -> build/lib.macosx-11-x86_64-3.9/notcurses
  copying src/notcurses/notcurses.py -> build/lib.macosx-11-x86_64-3.9/notcurses
  copying src/notcurses/build_notcurses.py -> build/lib.macosx-11-x86_64-3.9/notcurses
  running egg_info
  writing src/notcurses.egg-info/PKG-INFO
  writing dependency_links to src/notcurses.egg-info/dependency_links.txt
  writing requirements to src/notcurses.egg-info/requires.txt
  writing top-level names to src/notcurses.egg-info/top_level.txt
  adding license file 'LICENSE.txt' (matched pattern 'LICEN[CS]E*')
  reading manifest file 'src/notcurses.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  writing manifest file 'src/notcurses.egg-info/SOURCES.txt'
  running build_ext
  generating cffi module 'build/temp.macosx-11-x86_64-3.9/_notcurses.c'
  creating build/temp.macosx-11-x86_64-3.9
  building '_notcurses' extension
  creating build/temp.macosx-11-x86_64-3.9/build
  creating build/temp.macosx-11-x86_64-3.9/build/temp.macosx-11-x86_64-3.9
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/[email protected]/include -I/usr/local/opt/sqlite/include -I/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c build/temp.macosx-11-x86_64-3.9/_notcurses.c -o build/temp.macosx-11-x86_64-3.9/build/temp.macosx-11-x86_64-3.9/_notcurses.o
  build/temp.macosx-11-x86_64-3.9/_notcurses.c:570:14: fatal error: 'notcurses/direct.h' file not found
      #include <notcurses/direct.h>
               ^~~~~~~~~~~~~~~~~~~~
  1 error generated.
  error: command '/usr/bin/clang' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for notcurses

I guess there is an -I that is missing to the temp directory where the project is built? I don't know shit about fuck when it comes to Python packaging though.

#2391 seems related.

@KristofferC KristofferC added the bug Something isn't working label Dec 18, 2021
@dankamongmen dankamongmen added the python python wrappers label Dec 19, 2021
@dankamongmen
Copy link
Owner

5yfg4p

@KristofferC
Copy link
Contributor Author

As a follow-up question, what is the intended way to use the wrappers in the python folder? It seems with pip you get the ones in cffi but those seem quite a bit more spartan than the ones in python.

@dankamongmen
Copy link
Owner

yes, i have not yet switched to @igo95862 's wrappers (the ones in python/) for pip.

#1154 covers this. iirc, we were missing man pages or example binaries, something like that. we'd like to switch to them sooner rather than later.

@dankamongmen
Copy link
Owner

i'm now seeing general failure building either old or new python on our macOS ci. happy friday to me!

@dankamongmen dankamongmen added this to the 3.1.0 milestone Jan 23, 2022
@dankamongmen
Copy link
Owner

@alexhsamuel , any chance you could look into this? =]

@alexhsamuel
Copy link
Collaborator

Sure. But... I just factory-reset my MacBook last night and installed Monterey. Will probably take me a couple days to get everything installed again.

@lokxii
Copy link

lokxii commented Mar 16, 2024

Are there any updates on this? I am still encountering the same problem today

@mttkay
Copy link

mttkay commented Nov 8, 2024

This worked for me:

brew install notcurses

Then:

CFLAGS=-I/opt/homebrew/include pip install notcurses

However, this package seems broken. It is basically empty: #2803

@mttkay
Copy link

mttkay commented Nov 8, 2024

I think I'm running in circles here. This issue seems to be the reason it's empty, because the CI job does not build it anymore 💡 : #2803 (comment)

Publishing empty packages is sending people new to this library on wild goose chases. Maybe just take it down?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working macOS python python wrappers
Projects
None yet
Development

No branches or pull requests

5 participants