I think I have tried most of the solutions/suggestions on internet for this issue.
I'm using macOS Monterey / M1 Max / node version 10., and facing this error saying :
/bin/sh: 1: pkg-config: not found
gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
Error: gyp failed with exit code: 1
I have tried installing pkg-config with brew, but having the same error. Does anyone have idea about this issue? I also have rosetta installed.
Answer suggested here worked for me: Problem running npm install - newbie here
brew install pkg-config cairo pango libpng jpeg giflib librsvg
npm install -g canvas
Related
I'm trying to install fastecdsa on macOS BigSur (M1 chip) by running
(venv) $ pip3 install fastecdsa
and even though I previously installed gmp:
$ brew install gmp
it cant find the lib, no matter what I do
src/curve.h:4:10: fatal error: 'gmp.h' file not found
#include "gmp.h"
Although the error changed when I created a symlink
ln -s /opt/homebrew/include/gmp.h /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include
and now I get:
ld: library not found for -lgmp
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command '/usr/bin/gcc' failed with exit code 1
I also tried:
passing the path via env CFLAGS, LDFLAGS and both via global env export (export CFLAGS=...)
LDFLAGS=-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib pip3 install fastecdsa
CFLAGS=-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include pip3 install fastecdsa
xcode-select --install
endlessly brew uninstall gmp and brew install gmp, even brew reinstall gmp and brew unlink gmp
installing rosetta2
turning it off and on again
I can't put my finger on it :(
You may have resolved this by now, but just to say that I ran into something similar, and the solution for me was to tell ld to look in the homebrew library path. Run this/add it to ~/.profile:
export LIBRARY_PATH=$LIBRARY_PATH:/opt/homebrew/lib
export INCLUDE_PATH=$INCLUDE_PATH:/opt/homebrew/include
(I didn't need INCLUDE_PATH in my case, but it looks like you might!)
After that, perhaps your python commands will start working!
enter image description here
use the setup.py to install and modify the setup.py as the image
so I am trying to install kivy on my mac.From their instructions page, I am on step 2, and have to enter the command $ USE_OSX_FRAMEWORKS=0 pip install kivy. However, when I put this in terminal, I get the error error: command '/usr/bin/clang' failed with exit status 1, and as a result Failed building wheel for kivy. Does anyone know how to address this issue?
Just had this issue, and was able to fix it following the directions on the kivy mac OS X install page, with one modification as follows:
$ brew install pkg-config sdl2 sdl2_image sdl2_ttf sdl2_mixer gstreamer
$ pip3 install Cython==0.25.2
$ pip3 install kivy
pip3 is my reference to pip for Python 3.6 as I have two different versions of python on my system. May just be pip install for you.
Hope this helps!
I have following issue of installing pygame package.
In file included from src/_numericsurfarray.c:23:
src/pygame.h:106:10: fatal error: 'SDL.h' file not found
#include <SDL.h>
^
1 error generated.
error: Setup script exited with error: command 'gcc' failed with exit status 1
System information
Mac OS-10.9.2
python version- Python 2.7.5 :: Anaconda 1.6.1 (x86_64)
Any suggestion will be greatly appreciate ? Thanks.
Here (OSX Mavericks) I got able to install this way:
brew install sdl sdl_image sdl_mixer sdl_ttf portmidi
pip install https://bitbucket.org/pygame/pygame/get/default.tar.gz
("default" branch is on commit e3ae850 right now)
Source: https://bitbucket.org/pygame/pygame/issue/139/sdlh-not-found-even-thought-it-exists#comment-3822470
See this other StackOverflow question too: PyGame in a virtualenv on OS X with brew?
I had the same issue. I tried all versions of the answers to this question including variations of pip and pip3. Finally, the one that worked for me was:
sudo easy_install pygame
Note, however, that: (1) https://setuptools.readthedocs.io/en/latest/easy_install.html says that easy_install is deprecated and recommends using pip. (2) pygame is installed in the old standard python 2.7 folder rather than in the python 3.8.3 that I just installed -- though I was able to use it successfully in VSCode.
My system is also OSX10.9.2,and I also meet you problem,and I'm still try some;
Maybe this will be help for you:
there are some step:
1.Install [Quartz](https://xquartz.macosforge.org/landing/);
2.Install Xcode-Command-Line,
but you may cant install it by `xcode-select --install`,
so you can down from
https://developer.apple.com/downloads/index.action ;
I suggest you setup xcode,and this really solute my some problem;
3.`brew tap homebrew/headonly`
`brew install smpeg --HEAD`
`brew install sdl sdl_image sdl_mixer sdl_ttf portmidi`
4. `sudo pip install hg+http://bitbucket.org/pygame/pygame`;
if you clone this repo and try `python setup.py install`,you may meet some weird problem;
I have try install kivy which is base on pygame and I try lots of times,but just success install pygame one time.Then I uninstall it and also can't install it ;(
some refer:
http://jamesfriend.com.au/installing-pygame-python-mac-os-108-mountain-lion
http://juliaelman.com/blog/2013/04/02/installing-pygame-on-osx-mountain-lion/
=======update
Now I have install pygmae sucess,remeber you should install xcode,not only xcode-command-line!
I managed to install pygame on Mac OSX 10.14.4 using the following:
brew install sdl sdl_image sdl_mixer sdl_ttf portmidi
sudo -H pip3.8 install pygame
This Work for me:
If you haven't installed Python/pip via homebrew (you're using the system-installed Python), you would likely need to run sudo pip3 install pygame.
Before running pip3 install pygame, I had also installed Command Line Tools for XCode), as well as XQuartz, and the following homebrew packages: brew install sdl sdl_image sdl_mixer sdl_ttf smpeg portmidi.
If homebrew fails to install smpeg you might need to do the following:
brew tap homebrew/headonly
brew install --HEAD smpeg
Source: http://jamesfriend.com.au/installing-pygame-python-mac-os-108-mountain-lion
When trying to install Pillow using PIP, I get this include error:
μ ~: pip install pillow
...
libImaging/TiffDecode.h:10:10: fatal error: 'tiffio.h' file not found
#include <tiffio.h>
^
1 error generated.
error: command 'cc' failed with exit status 1
Does anyone know how to resolve this? I'm on OS X 10.9 and have previously been able to build Pillow on this computer.
Update: Note that I have tiffio.h on my machine at /usr/local/include/tiffio.h. After setting that directory to the C include path, I am able to successfully compile Pillow.
μ ~: C_INCLUDE_PATH=/usr/local/include
μ ~: pip install pillow
Downloading/unpacking pillow
...
Successfully installed pillow
Cleaning up...
Is this how it's supposed to be done, or is there something wrong with my machine or the installation package?
I faced the same issue and got it solved by installing libtiff using homebrew:
brew install libtiff
Just want to install Fontforge on mac os x, and firstly tried: brew install fontforge but got Error: Failed executing: make (fontforge.rb:38) and then tried brew install fontforge --use-clang but still the same error.
Then I tried brew install fontforge --use-gcc however Error: GCC could not be found
But the gcc --version shows i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1.....
and alse I've installed xcode, command line tools for xcode, cairo
I'm a newbie on mac and have totally lost, what should I do?
Any suggestions would be appreciated and thanks in advance.
well, it has been solved by this:
https://github.com/mxcl/homebrew/issues/11457