How to install geopandas with numexpr and bottleneck using conda
See original GitHub issueI have trouble installing a clean miniconda environment + geopandas as per the official docs.
My problem is that even though I was able to install geopandas on it’s own, the moment I add the numexpr and bottleneck accelerator libraries, conda goes into a crazy mode and adds different packages from incompatible sources and the whole system ends up broken, with fiona / ImportError: libpoppler.so lines.
Now that many new changes have been implemented in conda, for example strict channel priority, I don’t know what is the right way to install geopandas from conda-forge.
My question is what is the right command sequence to install a clean geopandas environment with a miniconda install for Python 3.7?
So far here is my script (from a Dockerfile), which is gets broken if numexpr and bottleneck is included.
COPY config/.condarc /root/.condarc
RUN wget --quiet https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \
    /bin/bash ~/miniconda.sh -b -p /opt/conda && \
    rm ~/miniconda.sh && \
    ln -s /opt/conda/bin/conda /usr/bin/conda && \
    ln -s /opt/conda/bin/python /usr/bin/condapy && \
    ln -s /opt/conda/bin/pip /usr/bin/condapip && \
    conda update -y --all && \
    conda install -c conda-forge geopandas numexpr bottleneck && \
    conda clean -y --all
.condarc
channels:
  - conda-forge
  - defaults
auto_update_conda: false
What kind of changes are needed to make this work on a recent conda install?
Especially, I’m not sure about the following parts:
- Do I need .condarc, or I can run conda-config commands after install?
 - If I really don’t want anything from the 
defaultschannel, can I just remove it? - Can I remove 
defaultsit by simply not listing it in .condarc, or I need to run aconda config --remove channels defaultscommand? - How can I insert strict channel priority into the above script?
 
Note: I also opened a SO question, as it might be a better place, feel free to answer over there if you deem it better https://stackoverflow.com/questions/54797185/how-to-install-geopandas-with-numexpr-and-bottleneck-using-conda
Issue Analytics
- State:
 - Created 5 years ago
 - Comments:22 (14 by maintainers)
 

Top Related StackOverflow Question
Thanks a lot for the answers, here is what I came up with, for a purpose-built environment, where defaults channel can be removed.
Dockerfile “one liner”:
Conclusion: I really need to update the installation docs … 😉