rene-dev / homebrew-sigrok

sigrok for osx
http://sigrok.org/wiki/Mac_OS_X#Building_using_Homebrew
15 stars 13 forks source link

python3 not detected when installing libsigrokdecode #2

Closed jasonblewis closed 10 years ago

jasonblewis commented 10 years ago

When i attempt to install libsigrokdecode, the ./configure script fails to find python3 even though the most recent is installed.

brew  install -vd --HEAD libsigrokdecode
.
.
.
checking for python3... no
checking for python33... no
checking for python32... no
checking for python31... no
checking for python30... no
configure: error: Package requirements (python-3.0 >= 3.0) were not met:

No package 'python-3.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables python30_CFLAGS
and python30_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
/usr/local/Library/Homebrew/formula.rb:600:in `system'
BuildError: Failed executing: ./configure --prefix=/usr/local/Cellar/libsigrokdecode/HEAD
1. raise
2. ignore
3. backtrace
4. irb
5. shell

if I drop to the shell, python 3 is there:

4. irb
5. shell
Choose an action: 5
When you exit this shell, you will return to the menu.
bash-3.2$ which python3
/usr/local/bin/python3
bash-3.2$ 

and running ./configure:

.
.
.
checking pkg-config is at least version 0.16... yes
checking for GLIB - version >= 2.24.0... yes (version 2.38.2)
checking for python3... no
checking for python33... no
checking for python32... no
checking for python31... no
checking for python30... no
configure: error: Package requirements (python-3.0 >= 3.0) were not met:

No package 'python-3.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables python30_CFLAGS
and python30_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
bash-3.2$ echo $PKG_CONFIG_PATH
/usr/local/opt/libzip/lib/pkgconfig:/usr/local/opt/libffi/lib/pkgconfig:/usr/local/opt/glib/lib/pkgconfig:/usr/local/opt/libusb/lib/pkgconfig:/usr/local/opt/libsigrok/lib/pkgconfig
bash-3.2$ which python3
/usr/local/bin/python3
bash-3.2$ 

i also tried adding /usr/local/bin to the $PKG_CONFIG_PATH but configure still failed.

TomKeddie commented 10 years ago

I see the same issues with macports. I fixed this with

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/:/opt/local/lib/pkgconfig:/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/pkgconfig

I also had to create a symlink for python3

ln -s /opt/local/bin/python3.3 ~/bin/python3

cho45 commented 10 years ago

I met same issue and recoveried by following:

$ sudo brew install -vd  --HEAD libsigrokdecode
...
1. raise
2. ignore
3. backtrace
4. irb
5. shell
Choose an action: 4
irb(libsigrokdecode)>ENV['PKG_CONFIG_PATH'] += ":/usr/local/Cellar/python3/3.3.4/Frameworks/Python.framework/Versions/3.3/lib/pkgconfig"
irb(libsigrokdecode)>system('./configure --prefix=/usr/local/Cellar/libsigrokdecode/HEAD')
...
irb(libsigrokdecode)>exit
...
==> Summary
�  /usr/local/Cellar/libsigrokdecode/HEAD: 85 files, 816K, built in 2.9 minutes
rene-dev commented 10 years ago

fixed. thanks jedahan.

100ideas commented 7 years ago

I also encountered this issue. In my case, brew rm python3 && brew install python3 fixed it.