-
Notifications
You must be signed in to change notification settings - Fork 900
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Geopandas cannot be installed on M1 #1816
Comments
Hmm, I don't really have a way to debug this. It is not surprising though. Have you tried specifying conda-forge channel ( To find out what the issue is, (if conda-forge won't solve it) I would need you to try installing dependencies one by one to figure out which one causes trouble (but based on the error, channels may resolve it). |
I get the same issue with conda-forge channel: (gds) frankjimenez@franks-mbp ~ % conda install -c conda-forge geopandas Collecting package metadata (current_repodata.json): done UnsatisfiableError: The following specifications were found to be incompatible with each other: Output in format: Requested package -> Available versions (gds) frankjimenez@franks-mbp ~ % |
Just checked: I cannot install Shapely, Fiona or Pyproj. |
Thanks. I guess that this needs to be resolved in the upstream then. My sense is that C dependencies of these libraries are not yet built for Apple silicon. Something like docker under rosetta2 may work in the meantime (just guessing)? A relevant issue on shapely side shapely/shapely#1080. |
Good idea. Will try whilst something comes up. Thanks. |
I am using GeoPandas (+pygeos) with a M1 MacBook Air, under rosetta 2 and miniforge without problems. |
How do you install python using Rosetta2 with miniforge? |
This is kinda out of topic, but I installed everything the normal way (including geopandas), but you have to use a rosetta Terminal to ensure that everything is runned as x86. See https://www.youtube.com/watch?v=PnxlHfGdihI for how to do it. |
Does this work fine? I am wondering what will happen once these libraries are supported on the apple chip... will this mess things up? |
Any updates on getting it to work natively (without Rosetta)? |
@fabge it is a bit out of our hands now. GeoPandas itself is pure Python and we need our dependencies to be compiled. |
Thanks for the quick reply! Unfortunately this didn't help, the installation still fails. Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: \
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed
UnsatisfiableError: The following specifications were found to be incompatible with each other:
Output in format: Requested package -> Available versions This one is the error in a vanilla conda env: Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: /
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed
UnsatisfiableError: |
This is indeed strange. I don't have access to the M1 machine so can't really help much I am afraid. |
Quick update: I made it work by installing from source. After installing the necessary packages with conda and installing
The important difference (from @martinfleis) is to conda install |
Could you add a simple procedure for trying? Did the same thing as you said and it didnt work 😢
|
try |
If you have all required dependencies installed and working, then |
Exactly, try to install geopandas with conda install pandas fiona shapely pyproj rtree
pip install geopandas (or |
I was having trouble running the above steps. What worked for me was to |
This has also worked for me! |
This worked for me, too! Thanks 😘 |
You're a lifesaver! Worked perfectly. |
At the moment, installing geopandas on M1 macs is no longer an issue and can be achieved via conda or pip+homebrew. See the summary below. Keep in mind that a lot of comments from the thread above are no longer true. GeoPandas itself is written in pure Python, so there is no issue running that on any architecture. However, it depends on other libraries that are written in other languages (C, C++) that need to be compiled specifically for M1 chips. While you could compile it yourself, I am not going to cover this option as it is not user friendly. There are three possible sources of required libraries - pip wheels, conda-forge, and Homebrew. When a Python package requires C dependency, it can create wheels with the dependency compiled for each system and chip architecture. See for example pygeos - https://pypi.org/project/pygeos/#files. What you need is Conda and conda-forge way (recommended)Conda-forge currently has all packages geopandas needs Install M1 version of miniforge or mambaforge. It can be downloaded from here - https://github.com/conda-forge/miniforge. conda install -c conda-forge geopandas pygeos Note: if you install x86 (Intel) version of conda, it will run under Rosetta2 and install all packages using x86 architecture, meaning that everything will run under emulation. Try to avoid that. Pip and Homebrew wayHomebrew can install C libraries compiled for M1. Python packages will find and use them. Using an environment with Python 3.9 Install shapely: brew install geos
export DYLD_LIBRARY_PATH=/opt/homebrew/opt/geos/lib/
pip install shapely
Install fiona:
Install pyproj:
Install geopandas and pygeos for speedups: pip install pygeos
pip install geopandas With all that, I am going to close the issue. |
@martinfleis |
@StevenLi-DS (I'm not across the M1 packaging situation particularly closely) I think the noarch install is all you need - geopandas itself is pure python, it just has compiled dependencies, note that the linux/ windows / osx specific architecture versions are for v0.3 which is well out of date. |
[Yes] I have read the documentation on installation and followed the instructions provided.
[Yes] I have looked through issues labeled "installation" in the geopandas repo.
If your issue is related to installation using the
conda-forge
channel, please open an issue in geopandas-feedstock repository instead.System information
[what operating system do you have and what package management system are you
using]
MacOS BigSur on Apple chip M1
Environment details
I followed the installation steps from Geopandas docs, but got an error on last step (see below):
(gds) frankjimenez@franks-mbp ~ % conda install python=3 geopandas
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: -
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed
UnsatisfiableError: The following specifications were found to be incompatible with each other:
Output in format: Requested package -> Available versions
Package python conflicts for:
geopandas -> pandas[version='>=0.23'] -> python[version='>=3.6|>=3.7|>=3.8,<3.9.0a0|>=3.9,<3.10.0a0']
geopandas -> python[version='>=3.5']
python=3
Note that strict channel priority may have removed packages required for satisfiability.
(gds) frankjimenez@franks-mbp ~ %
The text was updated successfully, but these errors were encountered: