Cython Installation Error on Os X - python

I tried to install Cython with pip, easy_install and from source code. And I am taking following error on OsX Maverics:
clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
error: command 'cc' failed with exit status 1
I am using Python 2.7.5
pip version 1.4.1
How can I resolve this error?

This is an issue with Mavericks. You can circumvent this as follows:
Terminal:
sudo CFLAGS=-Wunused-command-line-argument-hard-error-in-future pip install cython
This will suppress the errors as warnings, allowing you to install cython.

Related

pip install pyaudio gcc error "function declaration isn’t a prototype"

pip install pyaudio failed on MacOS with error src/_portaudiomodule.c:27:19: fatal error: stdio.h: No such file or directory #include <stdio.h>
After doing some research I ran the following commands:
1/ export CPATH=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/
2/ pip install --global-option='build_ext' --global-option='-I/usr/local/include' --global-option='-L/usr/local/lib' pyaudio
But got errors /usr/local/include/portaudio.h:114:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes] and error: command 'gcc' failed with exit status 1 instead.
It seems upgrading to MacOS Catalina messed up my Xcode Developer Tools C headers but am not able to resolve it.
i was able to solve this by copying portaudio.h from /usr/local/include/ to anaconda3/include.

Error while install lxml

I'm trying to install lxml with pip. I received this initial error when running my script:
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: xml. Do you need to install a parser library?
A quick search of the above error (such as here) revealed I need to install lxml.
While trying to install lxml I receive the following error:
clang: error: unknown argument: '-mno-fused-madd'
error: command 'cc' failed with exit status 1
Any idea what is going on?
According to Xcode 5 Release Notes:
The Apple LLVM compiler in Xcode 5.1 treats unrecognized command-line options as errors. This issue has been seen when building both Python native extensions and Ruby Gems, where some invalid compiler options are currently specified.
...
To workaround this issue, set the ARCHFLAGS environment variable to downgrade the error to a warning. For example, you can install a Python native extension with:
$ ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future \
easy_install ExtensionName
Set following environment variable before installing lxml:
export ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future

Can't compile PIL in Virtualenv

The latest pip 1.5 and Xcode 5.1 have made it difficult to install PIL in an virtualenv.
I have googled for various solutions and it seems I had to execute these two lines:
export ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future"
pip install PIL --allow-external PIL --allow-unverified PIL
However I am still getting an exception and I have no idea why. My colleague on a different machine has no problem with it.
I have installed Python and latest Xcode with Commandline Tools. Maybe the latter is corrupted?
clang: warning: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
clang: warning: argument unused during compilation: '-mno-fused-madd'
In file included from _imaging.c:75:
In file included from /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:19:
In file included from /usr/bin/../lib/clang/5.1/include/limits.h:38:
/usr/include/limits.h:63:10: fatal error: 'sys/cdefs.h' file not found
#include <sys/cdefs.h>
^
1 error generated.
error: command 'clang' failed with exit status 1
Try adding these to your .profile
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments

error installing fiona in OSX 10.9

I am having difficulty with installing fiona.
I have followed fiona's official documentation ( https://github.com/sgillies/fiona) as well as the related thread below.
trouble installing Fiona in python cpl_error.h: No such file or directory
I had no trouble with pip install shapely and I used brew install gdal. When I use the command pip install fiona I get a number of errors
clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
error: command 'cc' failed with exit status 1
as well as warnings with regards to gdal-config such as "Failed to get options via gdal-config"
I am worried there is an issue with gdal-config's location thats causing the issue. I think I might have had GDAL previously installed with kyngchaos for QGIS use a while ago before I used the brew install
Any insights would be much appreciated. I can't imagine I am the only one who has had issues installing fiona, but I haven't been able to find a resolution through google searching alone yet.
If you're using XCode 5.1, the problem is likely unrecognised options in Clang. See here for details on how to fix this: http://bruteforce.gr/bypassing-clang-error-unknown-argument.html

Error when Installing Pycurl on OS X

I am trying to install pycurl on OS X Mavericks. I have downloaded and installed the Xcode dev tools to have some compiler. I went into the Xcode preferences and made sure that I have downloaded all the compliers I would need but still getting this error
When I try to install pycurl I get the following errors. Any help would be much appreciated.
local-mbp:~ $ sudo easy_install pycurl
Password:
Searching for pycurl
Reading http://pypi.python.org/simple/pycurl/
Best match: pycurl 7.19.3.1
Downloading https://pypi.python.org/packages/source/p/pycurl/pycurl-7.19.3.1.tar.gz#md5=6df8fa7fe8b680d93248da1f8d4fcd12
Processing pycurl-7.19.3.1.tar.gz
Running pycurl-7.19.3.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-jKMmtE/pycurl-7.19.3.1/egg-dist-tmp-9z89Ns
Using curl-config (libcurl 7.30.0)
clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
error: Setup script exited with error: command 'cc' failed with exit status 1
local-mbp:~ $ which gcc
/usr/bin/gcc
local-mbp:~$ which cc
/usr/bin/cc
local-mbp:~$
Try this:
brew install python
Double check you are using brewed Python:
which python
(Should return something like /usr/local/bin/python)
Install pycurl with pip.
pip install pycurl
I just tested this on Mavericks.
Try specify the ARCHFLAGS env var:
ARCHFLAGS="-arch x86_64" pip install pycurl

Categories