notcurses
notcurses copied to clipboard
Failure to install using pip on mac
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.
https://github.com/dankamongmen/notcurses/issues/2391 seems related.
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
.
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.
i'm now seeing general failure building either old or new python on our macOS ci. happy friday to me!
@alexhsamuel , any chance you could look into this? =]
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.
Are there any updates on this? I am still encountering the same problem today