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
Related
I'm trying to install the package spectral-cube from the astropy project using pip (22.0.4). I get a long error which ends with this:
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for casa-formats-io.
Failed to build casa-formats-io.
ERROR: Could not build wheels for casa-formats-io, which is required to install pyproject.toml-based projects
Even after downloading casa-formats-io from their github I still get this error.
I've also tried installing this using conda, but the error is the same.
I'm using MacOS 12.3. But I had the problem with older versions.
I'm kind of confused as to what I can do.
Thanks for the help!
I was able to fix my own problem. The error appeared because the package I was trying to download wasn't available/compatible with the newest python version (3.10). So, I simply uninstalled Python and downloaded an older version (3.8).
Thanks anyways :)
Since I've upgraded my MacOs to Big Sur I'm having some trouble with my data science libraries. I was able to install the numpy and pandas (even though it took an unusual amount of time as stated at this topic). But can't manage to install the Matplotlib.
I've tried three things...
First with the default MacOs embedded Phyton 3.8.2 .
Reinstalled numpy, upgraded pip, but when I've tried to install Matplotlib. I've got the following error:
RuntimeError: Polyfit sanity test emitted a warning, most likely due to using a buggy Accelerate backend. If you compiled yourself, see site.cfg.example for information. Otherwise report this to the vendor that provided NumPy.
RankWarning: Polyfit may be poorly conditioned
Later, I've seen some suggestions here at stackoverflow for similar problems, one suggested to use homebrew, so I've installed Python 3.9.0 through brew. However, when I've tried to install Matplotlib, still got a giant error, when it was trying to install Pillow:
(.......) The headers or library files could not be found for jpeg,a required dependency when compiling
Pillow from source.Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
ERROR: Command errored out with exit status 1: /usr/local/opt/python#3.9/bin/python3.9 (...)
To finish (in almost despair) I've tried to create a virtual environment using venv (& Python 3.8.2) and was able to install NumPy successfully, however, I've got the following error trying to install Matplotlib:
(...... long line of code....) The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.
This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand. Please inform the package's author and the EasyInstall
maintainers to find out if a fix or workaround is available.
Really don't know what to do... Is it impossible to use Matplotlib with a clean install on BigSur? hahaha =(
I did it!!! I fix it!!
For this error :
RuntimeError: Polyfit sanity test emitted a warning, most likely due to using a buggy Accelerate backend.
If you compiled yourself, see site.cfg.example for information. Otherwise report this to the vendor that provided NumPy.
RankWarning: Polyfit may be poorly conditioned
I fixed installing an older numpy version.
pip3 install --force-reinstall numpy\<1.19
It did the job.
For the second error:
(.......) The headers or library files could not be found for jpeg,a required dependency when compiling
Pillow from source.Please see the install instructions at: https://pillow.readthedocs.io/en/latest/installation.html
ERROR: Command errored out with exit status 1: /usr/local/opt/python#3.9/bin/python3.9 (...)
It was the missing JPEG library. I do recommend you guys install homebrew.
Solved this problem with:
brew install libjpeg
your easy_install is outdated.so just update your setup_tools by excuting following command:
pip install setuptools==51
then
easy_install --version
make sure your easy_install's version is above 51.
I'm getting a strange linker error that I don't completely understand while attempting to install postgresql on OSX.
I've installed Postgres via Brew and now I'm trying to get my Django app up and running. I've added the postgres directory to my path. I'm running OSX Yosemite.
When I run the following command:
pip install psycopg2
I get this error:
ld: illegal text reloc in '_init_psycopg' to '_lobjectType' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'cc' failed with exit status 1
I'm at a loss where to go from here and my searches for this type of error has lead me no where. Any help would be amazing.
Thanks.
Turns out I had a couple versions of Postgres installed. I had to remove the old one and make sure the pg_config that was found in the PATH was the most recent one. As soon as I made sure the pg_config was the proper one, this error went away.
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
I am trying to install the python readline module. I have already installed readline via homebrew.
If I type
easy_install readline
I get
Downloading http://pypi.python.org/packages/source/r/readline/readline-6.2.2.tar.gz#md5=ad9d4a5a3af37d31daf36ea917b08c77
Processing readline-6.2.2.tar.gz
Writing /var/folders/44/dhrdb5sx53s243j4w03063vh0000gn/T/easy_install-64FbG8/readline-6.2.2/setup.cfg
Running readline-6.2.2/setup.py -q bdist_egg --dist-dir /var/folders/44/dhrdb5sx53s243j4w03063vh0000gn/T/easy_install-64FbG8/readline-6.2.2/egg-dist-tmp-NOmStB
clang: error: no such file or directory: 'readline/libreadline.a'
clang: error: no such file or directory: 'readline/libhistory.a'
error: Setup script exited with error: command '/usr/bin/clang' failed with exit status 1
Any ideas about how I could fix this ?
Thanks
There is a new solution to this problem in Pypi, pip install gnureadline.
https://pypi.python.org/pypi/gnureadline
The root issue is libedit (BSD-licensed) vs. Gnu Readline (GPL-licensed) . Apple would rather provide incompatible BSD code, than provide compatible code that has GPL restrictions.
This bug should be fixed in readline version 6.2.4 released last week.
Also note that you do not need to install the readline library itself via homebrew. It is already included within the python readline module.
Anyone having problems with the python-readline module is welcome to open an issue on the GitHub page of the module. This will ensure that the problem is permanently solved for everyone.
I had this same problem in OS X Lion 10.8, and fixed it by renaming my /Developer to /Developer-old. See this issue.
None of the above worked from me.
After uninstall ipython and readline, I ran the following that finally worked
easy_install http://pypi.python.org/packages/source/r/readline/readline-6.1.0.tar.gz
pip install ipython
And yes, readline 6.1.0 is an old one, but 6.2.x or other would not work (in sept 2013).
Try installing the binary egg directly:
$ easy_install http://pypi.python.org/packages/2.7/r/readline/readline-6.2.2-py2.7-macosx-10.7-intel.egg#md5=25383d860632d4a1521961ba68a52fe2
Make sure you have gcc installed.
which gcc
should return
/usr/bin/gcc
I was getting the same error when trying to easy_install readline. It wasn't until I downloaded the tar and tried to manually build it that I noticed it said
checking whether make sets $(MAKE)... no
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/Users/roneill/readline-6.2.4.1/rl/readline-lib':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
that I realized what the actual problem was. I had not used this particular laptop in a while and had not used Xcode to install the command line tools. Once I did, things worked properly.