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
Related
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.
I'm following this tutorial to install caffe on my OSX High Sierra.
I followed all steps but I'm stucked when installing R-CNN example at this step:
$ make -j8 && make pycaffe
LD -o .build_release/lib/libcaffe.so
clang: warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument]
ld: cannot link directly with /System/Library/Frameworks//vecLib.framework/vecLib for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [.build_release/lib/libcaffe.so] Error 1
But the library veclib is present:
$ ls /System/Library/Frameworks//vecLib.framework/vecLib
/System/Library/Frameworks//vecLib.framework/vecLib
Can you help me please to solve this issue ?
I met the same issue. I installed Xcode 9.3 Commandline tool and changed cmake/Modules/FindvecLib.cmake to something like this and it works:
find_path(vecLib_INCLUDE_DIR cblas.h
DOC "vecLib include directory"
PATHS /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Headers/
NO_DEFAULT_PATH)
For my case, NO_DEFAULT_PATH must be set or there will be still link error.
You can also refer to this.
I have a virtual env for python, and trying to install some packages in the virtual-env:
sudo /Users/edamame/Library/python_virenv/bin/pip install matplotlib
Then I got the following error:
:
:
clang: warning: -framework Tcl: 'linker' input unused
clang: warning: -framework Tk: 'linker' input unused
In file included from src/_tkagg.cpp:28:
/usr/local/include/tk.h:71:13: fatal error: 'X11/Xlib.h' file not found
# include <X11/Xlib.h>
^
1 error generated.
error: command 'cc' failed with exit status 1
I am on Mac El-Captain, and I have:
edamame$ locate Xlib.h
WARNING: The locate database (/var/db/locate.database) does not exist.
To create the database, run the following command:
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist
Please be aware that the database can take some time to generate; once
the database has been created, this message will no longer appear.
Any idea how I can fix this problem? Thanks!
You should either install the development files for X11 (from memory: libx11-dev), or if they are already installed, add the X11 directory to your include search path.
You can use locate Xlib.h to figure out if the files are already there. Use the -I compiler option to add directories to your search path.
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
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.