Orange Forum • View topic - pip install broken on Mac

pip install broken on Mac

A place to ask questions about methods in Orange and how they are used and other general support.

pip install broken on Mac

Postby jmvidal » Fri Aug 31, 2012 19:58

I cannot get 'pip install Orange' to work, an a Mac with the latest OS.

I did 'pip install Orange' and that failed because it was using clang. Following instructions on this board I did
export CC=gcc
export CXX=g++

(and set the /etc/sudoers appropriatedly) and tried again. Now when I run 'pip install Orange' it is failing because of the '-march=native' which apparently is not understood by apple compilers.

source/include/c2py.cpp:1: error: bad value (native) for -march= switch
source/include/c2py.cpp:1: error: bad value (native) for -mtune= switch

Help!

Full output below:

Downloading/unpacking Orange
Running setup.py egg_info for package Orange

package init file 'Orange/OrangeCanvas/__init__.py' not found (or not a regular file)
package init file 'Orange/OrangeWidgets/Associate/__init__.py' not found (or not a regular file)
package init file 'Orange/OrangeWidgets/Classify/__init__.py' not found (or not a regular file)
package init file 'Orange/OrangeWidgets/Data/__init__.py' not found (or not a regular file)
package init file 'Orange/OrangeWidgets/Evaluate/__init__.py' not found (or not a regular file)
package init file 'Orange/OrangeWidgets/Prototypes/__init__.py' not found (or not a regular file)
package init file 'Orange/OrangeWidgets/Regression/__init__.py' not found (or not a regular file)
package init file 'Orange/OrangeWidgets/Unsupervised/__init__.py' not found (or not a regular file)
package init file 'Orange/OrangeWidgets/Visualize/__init__.py' not found (or not a regular file)
package init file 'Orange/OrangeWidgets/Visualize Qt/__init__.py' not found (or not a regular file)
no previously-included directories found matching 'source/orangeqt/build'
no previously-included directories found matching 'source/*/px'
no previously-included directories found matching 'source/*/ppp'
Requirement already satisfied (use --upgrade to upgrade): numpy in /Library/Python/2.7/site-packages (from Orange)
Installing collected packages: Orange
Running setup.py install for Orange
package init file 'Orange/OrangeCanvas/__init__.py' not found (or not a regular file)
package init file 'Orange/OrangeWidgets/Associate/__init__.py' not found (or not a regular file)
package init file 'Orange/OrangeWidgets/Classify/__init__.py' not found (or not a regular file)
package init file 'Orange/OrangeWidgets/Data/__init__.py' not found (or not a regular file)
package init file 'Orange/OrangeWidgets/Evaluate/__init__.py' not found (or not a regular file)
package init file 'Orange/OrangeWidgets/Prototypes/__init__.py' not found (or not a regular file)
package init file 'Orange/OrangeWidgets/Regression/__init__.py' not found (or not a regular file)
package init file 'Orange/OrangeWidgets/Unsupervised/__init__.py' not found (or not a regular file)
package init file 'Orange/OrangeWidgets/Visualize/__init__.py' not found (or not a regular file)
package init file 'Orange/OrangeWidgets/Visualize Qt/__init__.py' not found (or not a regular file)
building 'orange_include' extension
gcc -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -Os -pipe -march=native -mmacosx-version-min=10.8 -Wno-unused-value -Wno-empty-body -Qunused-arguments -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/Library/Python/2.7/site-packages/numpy/core/include -Isource/include -I/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c source/include/c2py.cpp -o build/temp.macosx-10.8-intel-2.7/source/include/c2py.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
source/include/c2py.cpp:1: error: bad value (native) for -march= switch
source/include/c2py.cpp:1: error: bad value (native) for -mtune= switch
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
source/include/c2py.cpp:1: error: bad value (native) for -march= switch
source/include/c2py.cpp:1: error: bad value (native) for -mtune= switch
lipo: can't open input file: /var/tmp//ccQ9v2ew.out (No such file or directory)
error: command 'gcc' failed with exit status 1
Complete output from command /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools;__file__='/Users/jmvidal/build/Orange/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-plJEWj-record/install-record.txt:
running install

running build

running build_py

package init file 'Orange/OrangeCanvas/__init__.py' not found (or not a regular file)

package init file 'Orange/OrangeWidgets/Associate/__init__.py' not found (or not a regular file)

package init file 'Orange/OrangeWidgets/Classify/__init__.py' not found (or not a regular file)

package init file 'Orange/OrangeWidgets/Data/__init__.py' not found (or not a regular file)

package init file 'Orange/OrangeWidgets/Evaluate/__init__.py' not found (or not a regular file)

package init file 'Orange/OrangeWidgets/Prototypes/__init__.py' not found (or not a regular file)

package init file 'Orange/OrangeWidgets/Regression/__init__.py' not found (or not a regular file)

package init file 'Orange/OrangeWidgets/Unsupervised/__init__.py' not found (or not a regular file)

package init file 'Orange/OrangeWidgets/Visualize/__init__.py' not found (or not a regular file)

package init file 'Orange/OrangeWidgets/Visualize Qt/__init__.py' not found (or not a regular file)

running build_ext

building 'orange_include' extension

gcc -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -Os -pipe -march=native -mmacosx-version-min=10.8 -Wno-unused-value -Wno-empty-body -Qunused-arguments -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/Library/Python/2.7/site-packages/numpy/core/include -Isource/include -I/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c source/include/c2py.cpp -o build/temp.macosx-10.8-intel-2.7/source/include/c2py.o

cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++

source/include/c2py.cpp:1: error: bad value (native) for -march= switch

source/include/c2py.cpp:1: error: bad value (native) for -mtune= switch

cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++

source/include/c2py.cpp:1: error: bad value (native) for -march= switch

source/include/c2py.cpp:1: error: bad value (native) for -mtune= switch

lipo: can't open input file: /var/tmp//ccQ9v2ew.out (No such file or directory)

error: command 'gcc' failed with exit status 1

----------------------------------------
Command /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools;__file__='/Users/jmvidal/build/Orange/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-plJEWj-record/install-record.txt failed with error code 1 in /Users/jmvidal/build/Orange
Storing complete log in /Users/jmvidal/.pip/pip.log

Re: pip install broken on Mac

Postby Ales » Fri Aug 31, 2012 21:07

The gcc version that Apple ships (4.2) does no recognize 'naive' option. You can try explicitly setting it with
Code: Select all
export CPPFLAGS="-march=core2 -mtune=core2"
(or replace 'core2' with 'corei7' if that is your processor type) before running pip.

Or you can instead build the development version of Orange with clang (although you will still need to set some flags, this time 'CPPFLAGS=-Wno-address-of-temporary')
Code: Select all
export CPPFLAGS=-Wno-address-of-temporary
pip install -e hg+https://bitbucket.org/biolab/orange#egg=Orange
(for this you will also need Mercurial - you could just download the daily source snapshot and run 'setup.py install' manually).

Re: pip install broken on Mac

Postby jmvidal » Mon Sep 03, 2012 13:13

Thanks, that worked!

Except that I have an iMac, corei7, but gcc would not accept corei7 (not supported). gcc did accept core2, and that compiled and ran.

Looking at 'man gcc' on the imac it does not list 'corei7' as one of the available mtune options, so I guess it is an older version of gcc.


Return to Questions & Support