Skip to content
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

Installing Cartopy on linux / docker build fails on import - ImportError: libproj.so.19: cannot open shared object file: No such file or directory #93

Closed
3 tasks
lwasser opened this issue Oct 16, 2020 · 34 comments

Comments

@lwasser
Copy link
Member

lwasser commented Oct 16, 2020

Issue:
hi there @ocefpaf et al... i'm running into some issues with installing cartopy in a linux envt and am not sure whether to post here or on the cartopy GH repo? Essentially when i installed it i get this issue:

Python 3.8.6 | packaged by conda-forge | (default, Oct  7 2020, 19:08:05) 
[GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cartopy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/conda/lib/python3.8/site-packages/cartopy/__init__.py", line 96, in <module>
    import cartopy.crs
  File "/opt/conda/lib/python3.8/site-packages/cartopy/crs.py", line 36, in <module>
    from cartopy._crs import (CRS, Geodetic, Globe, PROJ4_VERSION,
ImportError: libproj.so.19: cannot open shared object file: No such file or directory

i've tried

and still i'm getting this cannot open shared object file issue. am i missing an important step? i tried to ensure all of the cartopy dependencies were installed but maybe they aren't. if i should post somewhere else please say the word.

  • currently i'm attempting to add proj4 (conda install -c conda-forge proj4 based on a few other threads i read but it seems to be having a hard time installing that / resolving the correct envt versions and has been spinning now for about 10 minutes.
    ANy suggestions on things i could try to get things to resolve correctly would be much appreciated!
(base) root@6526fb7f72d3:/# conda install -c conda-forge proj4
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): | 

Environment (conda list): https://github.com/earthlab/r-python-eds-lessons-env/blob/master/Dockerfile
$ conda list
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       1_gnu    conda-forge
_r-mutex                  1.0.1               anacondar_1    conda-forge
affine                    2.3.0                      py_0    conda-forge
alembic                   1.4.3              pyh9f0ad1d_0    conda-forge
ansiwrap                  0.8.4                      py_0    conda-forge
appdirs                   1.4.3                      py_1    conda-forge
argon2-cffi               20.1.0           py38h1e0a361_2    conda-forge
asn1crypto                1.4.0              pyh9f0ad1d_0    conda-forge
async_generator           1.10                       py_0    conda-forge
attrs                     20.2.0             pyh9f0ad1d_0    conda-forge
autopep8                  1.5.4              pyh9f0ad1d_0    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                        py_2    conda-forge
backports.functools_lru_cache 1.6.1                      py_0    conda-forge
beautifulsoup4            4.9.3              pyhb0f4dca_0    conda-forge
binutils_impl_linux-64    2.35                 h18a2f87_9    conda-forge
binutils_linux-64         2.35                hc3fd857_29    conda-forge
black                     18.5b1                     py_0    conda-forge
bleach                    3.2.1              pyh9f0ad1d_0    conda-forge
blinker                   1.4                        py_1    conda-forge
boost-cpp                 1.72.0               h8e57a91_0    conda-forge
branca                    0.3.1                      py_0    conda-forge
brotlipy                  0.7.0           py38h8df0ef7_1001    conda-forge
bs4                       4.9.3                         0    conda-forge
bwidget                   1.9.14                        0    conda-forge
bzip2                     1.0.8                h516909a_3    conda-forge
ca-certificates           2020.6.20            hecda079_0    conda-forge
cairo                     1.16.0            hcf35c78_1003    conda-forge
cartopy                   0.18.0           py38h172510d_0    conda-forge
cenpy                     1.0.0.post4                py_0    conda-forge
certifi                   2020.6.20        py38h924ce5b_2    conda-forge
cffi                      1.14.3           py38h1bdcb99_1    conda-forge
cfitsio                   3.470                hb60a0a2_2    conda-forge
cftime                    1.2.1            py38hab2c0dc_1    conda-forge
chardet                   3.0.4           py38h924ce5b_1008    conda-forge
chroma-py                 0.1.0.dev1                 py_0    conda-forge
click                     5.1                        py_0    conda-forge
click-plugins             1.1.1                      py_0    conda-forge
cligj                     0.5.0                      py_0    conda-forge
climata                   0.5.0                      py_0    conda-forge
cloudpickle               1.6.0                      py_0    conda-forge
colour                    0.1.5                      py_0    conda-forge
conda                     4.8.5            py38h924ce5b_3    conda-forge
conda-package-handling    1.7.0            py38h8df0ef7_6    conda-forge
contextily                1.0.1                      py_0    conda-forge
cryptography              3.1.1            py38hb23e4d4_1    conda-forge
curl                      7.68.0               hf8cf82a_0    conda-forge
cycler                    0.10.0                     py_2    conda-forge
cytoolz                   0.11.0           py38h1e0a361_1    conda-forge
dask-core                 2.30.0                     py_0    conda-forge
dbus                      1.13.6               he372182_0    conda-forge
decorator                 4.4.2                      py_0    conda-forge
defusedxml                0.6.0                      py_0    conda-forge
deprecated                1.2.10             pyh9f0ad1d_0    conda-forge
descartes                 1.1.0                      py_4    conda-forge
earthpy                   0.9.2                      py_0    conda-forge
elevation                 1.0.6                      py_0    conda-forge
entrypoints               0.3             py38h32f6830_1002    conda-forge
expat                     2.2.9                he1b5a44_2    conda-forge
fasteners                 0.14.1                     py_3    conda-forge
fftw                      3.3.8           nompi_h7f3a6c3_1112    conda-forge
fiona                     1.8.13           py38h033e0f6_1    conda-forge
folium                    0.11.0                     py_0    conda-forge
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      2.001                hab24e00_0    conda-forge
font-ttf-source-code-pro  2.030                hab24e00_0    conda-forge
font-ttf-ubuntu           0.83                 hab24e00_0    conda-forge
fontconfig                2.13.1            h86ecdb6_1001    conda-forge
fonts-conda-forge         1                             0    conda-forge
freetype                  2.10.3               he06d7ca_0    conda-forge
freexl                    1.0.5             h516909a_1002    conda-forge
fribidi                   1.0.10               h516909a_0    conda-forge
future                    0.18.2           py38h32f6830_2    conda-forge
fuzzywuzzy                0.17.0                     py_0    conda-forge
gcc_impl_linux-64         7.5.0               hd9e1a51_17    conda-forge
gcc_linux-64              7.5.0               he2a3fca_29    conda-forge
gdal                      3.0.4            py38h172510d_3    conda-forge
gdk-pixbuf                2.38.2               h3f25603_5    conda-forge
geocoder                  1.38.1                     py_1    conda-forge
geographiclib             1.50                       py_0    conda-forge
geojson                   2.5.0                      py_0    conda-forge
geopandas                 0.8.1                      py_0    conda-forge
geoplot                   0.4.1                      py_0    conda-forge
geopy                     2.0.0              pyh9f0ad1d_0    conda-forge
geos                      3.8.1                he1b5a44_0    conda-forge
geotiff                   1.5.1                hcbe54f9_9    conda-forge
gettext                   0.19.8.1          hf34092f_1003    conda-forge
gfortran_impl_linux-64    7.5.0               hfca37b7_17    conda-forge
gfortran_linux-64         7.5.0               ha081f1e_29    conda-forge
ghostscript               9.53.3               he1b5a44_1    conda-forge
giflib                    5.2.1                h516909a_2    conda-forge
glib                      2.66.1               he1b5a44_1    conda-forge
gmp                       6.2.0                he1b5a44_3    conda-forge
gobject-introspection     1.66.1           py38h03d966d_1    conda-forge
graphite2                 1.3.13            he1b5a44_1001    conda-forge
graphviz                  2.42.3               h0511662_0    conda-forge
gsl                       2.5                  h294904e_1    conda-forge
gst-plugins-base          1.14.5               h0935bb2_2    conda-forge
gstreamer                 1.14.5               h36ae1b5_2    conda-forge
gxx_impl_linux-64         7.5.0               h7ea4de1_17    conda-forge
gxx_linux-64              7.5.0               h547f3ba_29    conda-forge
harfbuzz                  2.4.0                h9f30f68_3    conda-forge
hdf4                      4.2.13            hf30be14_1003    conda-forge
hdf5                      1.10.5          nompi_h3c11f04_1104    conda-forge
hydrofunctions            0.1.7                      py_1    conda-forge
icu                       64.2                 he1b5a44_1    conda-forge
idna                      2.10               pyh9f0ad1d_0    conda-forge
imagecodecs-lite          2019.12.3        py38hab2c0dc_3    conda-forge
imageio                   2.9.0                      py_0    conda-forge
imagemagick               7.0.10_6        pl526ha9fe49d_0    conda-forge
importlib-metadata        2.0.0                      py_1    conda-forge
importlib_metadata        2.0.0                         1    conda-forge
ipykernel                 5.3.4            py38h1cdfbd6_1    conda-forge
ipython                   7.18.1           py38h1cdfbd6_1    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
ipywidgets                7.5.1              pyh9f0ad1d_1    conda-forge
jbig                      2.1               h516909a_2002    conda-forge
jedi                      0.17.2           py38h32f6830_1    conda-forge
jinja2                    2.11.2             pyh9f0ad1d_0    conda-forge
joblib                    0.17.0                     py_0    conda-forge
jpeg                      9d                   h516909a_0    conda-forge
json-c                    0.13.1            hbfbb72e_1002    conda-forge
jsonschema                3.2.0                      py_2    conda-forge
jupyter                   1.0.0                      py_2    conda-forge
jupyter_client            6.1.7                      py_0    conda-forge
jupyter_console           6.2.0                      py_0    conda-forge
jupyter_core              4.6.3            py38h32f6830_2    conda-forge
jupyterlab_pygments       0.1.2              pyh9f0ad1d_0    conda-forge
kealib                    1.4.13               hec59c27_0    conda-forge
kernel-headers_linux-64   2.6.32              h77966d4_13    conda-forge
kiwisolver                1.2.0            py38hbf85e49_1    conda-forge
krb5                      1.16.4               h2fd8d38_0    conda-forge
lcms2                     2.11                 hbd6801e_0    conda-forge
ld_impl_linux-64          2.35                 h769bd43_9    conda-forge
libblas                   3.8.0               17_openblas    conda-forge
libcblas                  3.8.0               17_openblas    conda-forge
libclang                  9.0.1           default_hde54327_0    conda-forge
libcurl                   7.68.0               hda55be3_0    conda-forge
libdap4                   3.20.4               hd3bb157_0    conda-forge
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libffi                    3.2.1             he1b5a44_1007    conda-forge
libgcc-devel_linux-64     7.5.0               h42c25f5_17    conda-forge
libgcc-ng                 9.3.0               h5dbcf3e_17    conda-forge
libgdal                   3.0.4                h94bbfbd_3    conda-forge
libgfortran-ng            7.5.0               hae1eefd_17    conda-forge
libgfortran4              7.5.0               hae1eefd_17    conda-forge
libglib                   2.66.1               h0dae87d_1    conda-forge
libgomp                   9.3.0               h5dbcf3e_17    conda-forge
libiconv                  1.16                 h516909a_0    conda-forge
libkml                    1.3.0             hd79254b_1012    conda-forge
liblapack                 3.8.0               17_openblas    conda-forge
libllvm9                  9.0.1                he513fc3_1    conda-forge
libnetcdf                 4.7.4           nompi_h9f9fd6a_101    conda-forge
libopenblas               0.3.10          pthreads_hb3c22a3_5    conda-forge
libpng                    1.6.37               hed695b0_2    conda-forge
libpq                     12.2                 hae5116b_0    conda-forge
libpysal                  4.3.0                      py_0    conda-forge
librsvg                   2.50.1               h33a7fed_0    conda-forge
libsodium                 1.0.17               h516909a_0    conda-forge
libspatialindex           1.9.3                he1b5a44_3    conda-forge
libspatialite             4.3.0a            heb269f5_1037    conda-forge
libssh2                   1.9.0                hab1572f_5    conda-forge
libstdcxx-devel_linux-64  7.5.0               h4084dd6_17    conda-forge
libstdcxx-ng              9.3.0               h2ae2ef3_17    conda-forge
libtiff                   4.1.0                hc3755c2_3    conda-forge
libtool                   2.4.6             h516909a_1005    conda-forge
libuuid                   2.32.1            h14c3975_1000    conda-forge
libwebp                   1.0.2                h56121f0_5    conda-forge
libxcb                    1.13              h14c3975_1002    conda-forge
libxkbcommon              0.10.0               he1b5a44_0    conda-forge
libxml2                   2.9.10               hee79883_0    conda-forge
lz4-c                     1.9.2                he1b5a44_3    conda-forge
make                      4.3                  hd18ef5c_1    conda-forge
mako                      1.1.3              pyh9f0ad1d_0    conda-forge
mapboxgl                  0.10.2                     py_1    conda-forge
mapclassify               2.3.0                      py_0    conda-forge
markupsafe                1.1.1            py38h8df0ef7_2    conda-forge
matplotlib                3.3.2            py38h32f6830_1    conda-forge
matplotlib-base           3.3.2            py38h4d1ce4f_1    conda-forge
mercantile                1.1.6              pyh9f0ad1d_0    conda-forge
mistune                   0.8.4           py38h1e0a361_1002    conda-forge
monotonic                 1.5                        py_0    conda-forge
munch                     2.5.0                      py_0    conda-forge
nano                      2.9.8             hddfc1eb_1001    conda-forge
nbclean                   0.3.2              pyh5ca1d4c_0    conda-forge
nbclient                  0.5.1                      py_0    conda-forge
nbconvert                 6.0.7            py38h32f6830_1    conda-forge
nbformat                  5.0.8                      py_0    conda-forge
nbgrader                  0.6.1            py38h32f6830_0    conda-forge
nc-time-axis              1.2.0                      py_1    conda-forge
ncurses                   6.2                  he1b5a44_2    conda-forge
nest-asyncio              1.4.1                      py_0    conda-forge
netcdf4                   1.5.3           nompi_py38heb6102f_103    conda-forge
networkx                  2.5                        py_0    conda-forge
nltk                      3.4.4                      py_0    conda-forge
notebook                  6.1.4            py38h32f6830_1    conda-forge
nspr                      4.29                 he1b5a44_0    conda-forge
nss                       3.57                 he751ad9_0    conda-forge
numpy                     1.19.2           py38hbc27379_1    conda-forge
oauthlib                  3.0.1                      py_0    conda-forge
olefile                   0.46               pyh9f0ad1d_1    conda-forge
openjpeg                  2.3.1                h981e76c_3    conda-forge
openssl                   1.1.1h               h516909a_0    conda-forge
owslib                    0.20.0                     py_0    conda-forge
packaging                 20.4               pyh9f0ad1d_0    conda-forge
palettable                3.3.0                      py_0    conda-forge
pandas                    1.1.3            py38hc5bc63f_2    conda-forge
pandoc                    2.11.0.2             hd18ef5c_0    conda-forge
pandocfilters             1.4.2                      py_1    conda-forge
pango                     1.42.4               h7062337_4    conda-forge
papermill                 2.2.0                      py_1    conda-forge
parso                     0.7.1              pyh9f0ad1d_0    conda-forge
patsy                     0.5.1                      py_0    conda-forge
pcre                      8.44                 he1b5a44_0    conda-forge
perl                      5.26.2            h516909a_1006    conda-forge
pexpect                   4.8.0              pyh9f0ad1d_2    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    8.0.0            py38h9776b28_0    conda-forge
pip                       20.2.3                     py_0    conda-forge
pixman                    0.38.0            h516909a_1003    conda-forge
pkg-config                0.29.2            h516909a_1007    conda-forge
poppler                   0.67.0               h14e79db_8    conda-forge
poppler-data              0.4.9                         1    conda-forge
postgresql                12.2                 hf1211e9_0    conda-forge
proj                      6.3.1                hc80f0dc_1    conda-forge
prometheus_client         0.8.0              pyh9f0ad1d_0    conda-forge
prompt-toolkit            3.0.8                      py_0    conda-forge
prompt_toolkit            3.0.8                         0    conda-forge
pthread-stubs             0.4               h14c3975_1001    conda-forge
ptyprocess                0.6.0                   py_1001    conda-forge
pycodestyle               2.6.0              pyh9f0ad1d_0    conda-forge
pycosat                   0.6.3           py38h8df0ef7_1005    conda-forge
pycparser                 2.20               pyh9f0ad1d_2    conda-forge
pyepsg                    0.4.0                      py_0    conda-forge
pygments                  2.7.1                      py_0    conda-forge
pyjwt                     1.7.1                      py_0    conda-forge
pyopenssl                 19.1.0                     py_1    conda-forge
pyparsing                 2.4.7              pyh9f0ad1d_0    conda-forge
pyproj                    2.6.0            py38h95a477d_0    conda-forge
pyqt                      5.12.3           py38ha8c2ead_3    conda-forge
pyqt5-sip                 4.19.18                  pypi_0    pypi
pyqtchart                 5.12                     pypi_0    pypi
pyqtwebengine             5.12.1                   pypi_0    pypi
pyrsistent                0.17.3           py38h1e0a361_1    conda-forge
pysal                     2.1.0                      py_0    conda-forge
pyshp                     2.1.2              pyh9f0ad1d_0    conda-forge
pysocks                   1.7.1            py38h924ce5b_2    conda-forge
python                    3.8.6           h852b56e_0_cpython    conda-forge
python-dateutil           2.8.1                      py_0    conda-forge
python-editor             1.0.4                      py_0    conda-forge
python-levenshtein        0.12.0          py38h1e0a361_1004    conda-forge
python_abi                3.8                      1_cp38    conda-forge
pytz                      2020.1             pyh9f0ad1d_0    conda-forge
pywavelets                1.1.1            py38hab2c0dc_3    conda-forge
pyyaml                    5.3.1            py38h8df0ef7_1    conda-forge
pyzmq                     19.0.1           py38ha71036d_0    conda-forge
qt                        5.12.5               hd8c4c69_1    conda-forge
qtconsole                 4.7.7              pyh9f0ad1d_0    conda-forge
qtpy                      1.9.0                      py_0    conda-forge
r-askpass                 1.1               r35hcdcec82_1    conda-forge
r-assertthat              0.2.1             r35h6115d3f_1    conda-forge
r-backports               1.1.6             r35hcdcec82_1    conda-forge
r-base                    3.5.1             hc461eb7_1012    conda-forge
r-base64enc               0.1_3           r35hcdcec82_1003    conda-forge
r-bh                      1.72.0_3          r35h6115d3f_0    conda-forge
r-bit                     1.1_15.2          r35hcdcec82_0    conda-forge
r-bitops                  1.0_6           r35hcdcec82_1003    conda-forge
r-brew                    1.0_6           r35h6115d3f_1002    conda-forge
r-broom                   0.5.6             r35h6115d3f_0    conda-forge
r-callr                   3.4.3             r35h6115d3f_0    conda-forge
r-class                   7.3_17            r35hcdcec82_0    conda-forge
r-classint                0.4_3             r35h9bbef5b_0    conda-forge
r-cli                     2.0.2             r35h6115d3f_0    conda-forge
r-clipr                   0.7.0             r35h6115d3f_0    conda-forge
r-codetools               0.2_16          r35h6115d3f_1001    conda-forge
r-colorspace              1.4_1             r35hcdcec82_1    conda-forge
r-commonmark              1.7             r35hcdcec82_1001    conda-forge
r-covr                    3.5.0             r35h0357c0b_0    conda-forge
r-cowplot                 1.0.0             r35h6115d3f_1    conda-forge
r-crayon                  1.3.4           r35h6115d3f_1002    conda-forge
r-crosstalk               1.1.0.1           r35h6115d3f_0    conda-forge
r-curl                    4.3               r35hcdcec82_0    conda-forge
r-cyphr                   1.1.0             r35h6115d3f_0    conda-forge
r-data.table              1.12.8            r35hcdcec82_0    conda-forge
r-dbi                     1.1.0             r35h6115d3f_0    conda-forge
r-desc                    1.2.0           r35h6115d3f_1002    conda-forge
r-devtools                2.3.0             r35h6115d3f_0    conda-forge
r-digest                  0.6.25            r35h0357c0b_1    conda-forge
r-dplyr                   0.8.5             r35h0357c0b_0    conda-forge
r-dt                      0.13              r35h6115d3f_0    conda-forge
r-dygraphs                1.1.1.6         r35h6115d3f_1002    conda-forge
r-e1071                   1.7_3             r35h0357c0b_0    conda-forge
r-ellipsis                0.3.0             r35hcdcec82_0    conda-forge
r-evaluate                0.14              r35h6115d3f_1    conda-forge
r-fansi                   0.4.1             r35hcdcec82_0    conda-forge
r-farver                  2.0.3             r35h0357c0b_0    conda-forge
r-ff                      2.2_14.2          r35he1b5a44_0    conda-forge
r-fnn                     1.1.3             r35h0357c0b_1    conda-forge
r-foreign                 0.8_76            r35hcdcec82_0    conda-forge
r-fs                      1.4.1             r35h0357c0b_0    conda-forge
r-generics                0.0.2           r35h6115d3f_1002    conda-forge
r-getpass                 0.2_2           r35h516909a_1003    conda-forge
r-gganimate               1.0.5             r35h6115d3f_0    conda-forge
r-ggforce                 0.3.1             r35h0357c0b_0    conda-forge
r-ggmap                   3.0.0             r35h6115d3f_1    conda-forge
r-ggplot2                 3.3.0             r35h6115d3f_0    conda-forge
r-ggraph                  2.0.2             r35h0357c0b_0    conda-forge
r-ggrepel                 0.8.2             r35h0357c0b_0    conda-forge
r-ggsn                    0.5.0             r35h6115d3f_1    conda-forge
r-ggthemes                4.2.0             r35h6115d3f_1    conda-forge
r-gh                      1.1.0             r35h6115d3f_0    conda-forge
r-git2r                   0.26.1            r35h7253d3a_1    conda-forge
r-glue                    1.4.0             r35hcdcec82_0    conda-forge
r-graphlayouts            0.7.0             r35h0357c0b_0    conda-forge
r-gridextra               2.3             r35h6115d3f_1002    conda-forge
r-gstat                   2.0_5             r35hcdcec82_0    conda-forge
r-gtable                  0.3.0             r35h6115d3f_2    conda-forge
r-hexbin                  1.28.1            r35h9bbef5b_0    conda-forge
r-highr                   0.8               r35h6115d3f_1    conda-forge
r-hms                     0.5.3             r35h6115d3f_0    conda-forge
r-htmltools               0.4.0             r35h0357c0b_0    conda-forge
r-htmlwidgets             1.5.1             r35h6115d3f_0    conda-forge
r-httpuv                  1.5.2             r35h0357c0b_1    conda-forge
r-httr                    1.4.1             r35h6115d3f_1    conda-forge
r-hunspell                3.0             r35h0357c0b_1001    conda-forge
r-igraph                  1.2.5             r35hd626d4e_0    conda-forge
r-ini                     0.3.1           r35h6115d3f_1002    conda-forge
r-intervals               0.15.2            r35h0357c0b_0    conda-forge
r-isoband                 0.2.1             r35h0357c0b_0    conda-forge
r-isocodes                2020.03.16        r35h6115d3f_0    conda-forge
r-janeaustenr             0.1.5           r35h6115d3f_1002    conda-forge
r-jpeg                    0.1_8.1           r35hcdcec82_0    conda-forge
r-jsonlite                1.6.1             r35hcdcec82_0    conda-forge
r-kernsmooth              2.23_17           r35hfa343cc_0    conda-forge
r-knitr                   1.28              r35h6115d3f_0    conda-forge
r-labeling                0.3             r35h6115d3f_1002    conda-forge
r-later                   1.0.0             r35h0357c0b_0    conda-forge
r-lattice                 0.20_41           r35hcdcec82_1    conda-forge
r-latticeextra            0.6_28          r35h6115d3f_1002    conda-forge
r-lazyeval                0.2.2             r35hcdcec82_1    conda-forge
r-leaflet                 2.0.3             r35h6115d3f_0    conda-forge
r-leaflet.providers       1.9.0             r35h6115d3f_0    conda-forge
r-lemon                   0.4.4             r35h6115d3f_0    conda-forge
r-lifecycle               0.2.0             r35h6115d3f_0    conda-forge
r-lubridate               1.7.8             r35h0357c0b_0    conda-forge
r-magick                  2.3               r35h0357c0b_0    conda-forge
r-magrittr                1.5             r35h6115d3f_1002    conda-forge
r-mapdata                 2.3.0           r35hcdcec82_1003    conda-forge
r-maps                    3.3.0           r35hcdcec82_1003    conda-forge
r-maptools                0.9_9             r35hcdcec82_0    conda-forge
r-markdown                1.1               r35hcdcec82_0    conda-forge
r-mass                    7.3_51.6          r35hcdcec82_1    conda-forge
r-matrix                  1.2_18            r35h7fa42b6_2    conda-forge
r-memoise                 1.1.0           r35h6115d3f_1003    conda-forge
r-mgcv                    1.8_31            r35h7fa42b6_0    conda-forge
r-microbenchmark          1.4_7             r35hcdcec82_0    conda-forge
r-mime                    0.9               r35hcdcec82_0    conda-forge
r-munsell                 0.5.0           r35h6115d3f_1002    conda-forge
r-nlme                    3.1_147           r35h9bbef5b_0    conda-forge
r-nlp                     0.2_0             r35h6115d3f_1    conda-forge
r-openssl                 1.4.1             r35he5c4762_0    conda-forge
r-pillar                  1.4.3             r35h6115d3f_0    conda-forge
r-pkgbuild                1.0.7             r35h6115d3f_0    conda-forge
r-pkgconfig               2.0.3             r35h6115d3f_0    conda-forge
r-pkgload                 1.0.2           r35h0357c0b_1001    conda-forge
r-plogr                   0.2.0           r35h6115d3f_1002    conda-forge
r-plotly                  4.9.2.1           r35h6115d3f_0    conda-forge
r-plyr                    1.8.6             r35h0357c0b_0    conda-forge
r-png                     0.1_7           r35hcdcec82_1003    conda-forge
r-polyclip                1.10_0            r35h0357c0b_1    conda-forge
r-praise                  1.0.0           r35h6115d3f_1003    conda-forge
r-prettyunits             1.1.1             r35h6115d3f_0    conda-forge
r-processx                3.4.2             r35hcdcec82_0    conda-forge
r-progress                1.2.2             r35h6115d3f_1    conda-forge
r-promises                1.1.0             r35h0357c0b_0    conda-forge
r-ps                      1.3.2             r35hcdcec82_0    conda-forge
r-purrr                   0.3.4             r35hcdcec82_0    conda-forge
r-r.methodss3             1.8.0             r35h6115d3f_0    conda-forge
r-r.oo                    1.23.0            r35h6115d3f_0    conda-forge
r-r.utils                 2.9.2             r35h6115d3f_0    conda-forge
r-r6                      2.4.1             r35h6115d3f_0    conda-forge
r-raster                  3.1_5             r35h0357c0b_0    conda-forge
r-rastervis               0.47              r35h6115d3f_0    conda-forge
r-rcmdcheck               1.3.3             r35h6115d3f_2    conda-forge
r-rcolorbrewer            1.1_2           r35h6115d3f_1002    conda-forge
r-rcpp                    1.0.4.6           r35h0357c0b_0    conda-forge
r-rcpparmadillo           0.9.870.2.0       r35h51c796c_0    conda-forge
r-rcppeigen               0.3.3.7.0         r35h0357c0b_0    conda-forge
r-rcurl                   1.98_1.2          r35hcdcec82_0    conda-forge
r-readr                   1.3.1           r35h0357c0b_1002    conda-forge
r-rematch2                2.1.2             r35h6115d3f_0    conda-forge
r-remotes                 2.1.1             r35h6115d3f_0    conda-forge
r-reshape2                1.4.4             r35h0357c0b_0    conda-forge
r-rex                     1.2.0             r35h6115d3f_0    conda-forge
r-rgdal                   1.4_8             r35h1ee3119_0    conda-forge
r-rgeos                   0.5_2             r35hb2de1b9_3    conda-forge
r-rgooglemaps             1.4.5.3           r35h6115d3f_0    conda-forge
r-rjson                   0.2.20          r35h0357c0b_1001    conda-forge
r-rjsonio                 1.3_1.4           r35h0357c0b_0    conda-forge
r-rlang                   0.4.5             r35hcdcec82_2    conda-forge
r-rmarkdown               2.1               r35h6115d3f_0    conda-forge
r-roxygen2                7.1.0             r35h0357c0b_0    conda-forge
r-rprojroot               1.3_2           r35h6115d3f_1002    conda-forge
r-rsaga                   1.3.0                     r35_1    conda-forge
r-rstudioapi              0.11              r35h6115d3f_0    conda-forge
r-rtweet                  0.7.0             r35h0357c0b_0    conda-forge
r-rversions               2.0.1             r35h6115d3f_0    conda-forge
r-scales                  1.1.0             r35h6115d3f_0    conda-forge
r-sessioninfo             1.1.1           r35h6115d3f_1001    conda-forge
r-sf                      0.9_2             r35h57f9e99_0    conda-forge
r-shapefiles              0.7               r35h6115d3f_1    conda-forge
r-slam                    0.1_47            r35hc57f18f_1    conda-forge
r-snowballc               0.7.0             r35hcdcec82_0    conda-forge
r-sodium                  1.1             r35hcdcec82_1001    conda-forge
r-sp                      1.4_1             r35hcdcec82_0    conda-forge
r-spacetime               1.2_3             r35h6115d3f_0    conda-forge
r-stopwords               2.0               r35h6115d3f_0    conda-forge
r-stringi                 1.4.6             r35h0e574ca_1    conda-forge
r-stringr                 1.4.0             r35h6115d3f_1    conda-forge
r-sys                     3.3               r35hcdcec82_0    conda-forge
r-testthat                2.3.2             r35h0357c0b_0    conda-forge
r-tibble                  3.0.1             r35hcdcec82_0    conda-forge
r-tidygraph               1.1.2             r35h0357c0b_1    conda-forge
r-tidyr                   1.0.2             r35h0357c0b_0    conda-forge
r-tidyselect              1.0.0             r35h6115d3f_0    conda-forge
r-tidytext                0.2.4             r35h6115d3f_0    conda-forge
r-tinytex                 0.22              r35h6115d3f_0    conda-forge
r-tm                      0.7_7             r35h0357c0b_0    conda-forge
r-tokenizers              0.2.1           r35h0357c0b_1001    conda-forge
r-tweenr                  1.0.1           r35h0357c0b_1001    conda-forge
r-units                   0.6_6             r35h0357c0b_0    conda-forge
r-usethis                 1.6.1             r35h6115d3f_0    conda-forge
r-utf8                    1.1.4           r35hcdcec82_1002    conda-forge
r-vctrs                   0.2.4             r35hcdcec82_0    conda-forge
r-viridis                 0.5.1           r35h6115d3f_1003    conda-forge
r-viridislite             0.3.0           r35h6115d3f_1002    conda-forge
r-webshot                 0.5.2             r35h6115d3f_0    conda-forge
r-whisker                 0.4               r35h6115d3f_0    conda-forge
r-widyr                   0.1.3             r35h6115d3f_0    conda-forge
r-withr                   2.2.0             r35h6115d3f_0    conda-forge
r-xfun                    0.13              r35h6115d3f_0    conda-forge
r-xml2                    1.3.2             r35h0357c0b_0    conda-forge
r-xopen                   1.0.0           r35h6115d3f_1002    conda-forge
r-xts                     0.12_0            r35hcdcec82_0    conda-forge
r-yaml                    2.2.1             r35hcdcec82_0    conda-forge
r-zeallot                 0.1.0           r35h6115d3f_1001    conda-forge
r-zoo                     1.8_7             r35hcdcec82_0    conda-forge
rasterio                  1.1.5            py38h033e0f6_1    conda-forge
rasterstats               0.14.0                     py_0    conda-forge
ratelim                   0.1.6                      py_2    conda-forge
readline                  8.0                  he28a2e2_2    conda-forge
requests                  2.24.0             pyh9f0ad1d_0    conda-forge
requests-oauthlib         1.3.0              pyh9f0ad1d_0    conda-forge
richdem                   0.3.4            py38hb3f55d8_0    conda-forge
rtree                     0.9.4            py38h08f867b_1    conda-forge
ruamel_yaml               0.15.80         py38h8df0ef7_1003    conda-forge
scikit-image              0.17.2           py38hc5bc63f_3    conda-forge
scikit-learn              0.23.2           py38hee58b96_0    conda-forge
scipy                     1.5.2            py38h8c5af15_2    conda-forge
seaborn                   0.11.0                        0    conda-forge
seaborn-base              0.11.0                     py_0    conda-forge
send2trash                1.5.0                      py_0    conda-forge
setuptools                49.6.0           py38h924ce5b_2    conda-forge
shapely                   1.7.1            py38hc7361b7_1    conda-forge
simplejson                3.17.2           py38h1e0a361_1    conda-forge
six                       1.15.0             pyh9f0ad1d_0    conda-forge
snuggs                    1.4.7                      py_0    conda-forge
soupsieve                 2.0.1                      py_1    conda-forge
sqlalchemy                1.3.20           py38h1e0a361_0    conda-forge
sqlite                    3.33.0               h4cf870e_1    conda-forge
statsmodels               0.12.0           py38hab2c0dc_1    conda-forge
suds-jurko                0.6             py38h32f6830_1004    conda-forge
sysroot_linux-64          2.12                h77966d4_13    conda-forge
tbb                       2020.2               hc9558a2_0    conda-forge
tenacity                  6.2.0                      py_1    conda-forge
terminado                 0.9.1            py38h32f6830_1    conda-forge
testpath                  0.4.4                      py_0    conda-forge
textblob                  0.15.3                     py_0    conda-forge
textwrap3                 0.9.2                      py_0    conda-forge
threadpoolctl             2.1.0              pyh5ca1d4c_0    conda-forge
tifffile                  2020.6.3                   py_0    conda-forge
tiledb                    1.7.0                h8efa9f0_4    conda-forge
tk                        8.6.10               hed695b0_1    conda-forge
tktable                   2.10                 h555a92e_3    conda-forge
toml                      0.10.1             pyh9f0ad1d_0    conda-forge
toolz                     0.11.1                     py_0    conda-forge
tornado                   6.0.4            py38h1e0a361_2    conda-forge
tqdm                      4.50.2             pyh9f0ad1d_0    conda-forge
traitlets                 5.0.5                      py_0    conda-forge
tweepy                    3.9.0              pyh9f0ad1d_0    conda-forge
tzcode                    2020a                h516909a_0    conda-forge
udunits2                  2.2.27.6          h4e0c4b3_1001    conda-forge
urllib3                   1.25.10                    py_0    conda-forge
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
webencodings              0.5.1                      py_1    conda-forge
wheel                     0.35.1             pyh9f0ad1d_0    conda-forge
widgetsnbextension        3.5.1            py38h32f6830_2    conda-forge
wq.core                   1.1.0                      py_0    conda-forge
wq.io                     1.1.0                      py_0    conda-forge
wrapt                     1.12.1           py38h1e0a361_1    conda-forge
xarray                    0.16.1                     py_0    conda-forge
xerces-c                  3.2.2             h8412b87_1004    conda-forge
xlrd                      1.2.0              pyh9f0ad1d_1    conda-forge
xorg-kbproto              1.0.7             h14c3975_1002    conda-forge
xorg-libice               1.0.10               h516909a_0    conda-forge
xorg-libsm                1.2.3             h84519dc_1000    conda-forge
xorg-libx11               1.6.12               h516909a_0    conda-forge
xorg-libxau               1.0.9                h14c3975_0    conda-forge
xorg-libxdmcp             1.1.3                h516909a_0    conda-forge
xorg-libxext              1.3.4                h516909a_0    conda-forge
xorg-libxpm               3.5.13               h516909a_0    conda-forge
xorg-libxrender           0.9.10            h516909a_1002    conda-forge
xorg-libxt                1.1.5             h516909a_1003    conda-forge
xorg-renderproto          0.11.1            h14c3975_1002    conda-forge
xorg-xextproto            7.3.0             h14c3975_1002    conda-forge
xorg-xproto               7.0.31            h14c3975_1007    conda-forge
xz                        5.2.5                h516909a_1    conda-forge
yaml                      0.2.5                h516909a_0    conda-forge
zeromq                    4.3.2                he1b5a44_2    conda-forge
zipp                      3.3.1                      py_0    conda-forge
zlib                      1.2.11            h516909a_1010    conda-forge
zstd                      1.4.5                h6597ccf_2    conda-forge

Details about conda and system ( conda info ):
$ conda info

     active environment : base
    active env location : /opt/conda
            shell level : 1
       user config file : /root/.condarc
 populated config files : /root/.condarc
          conda version : 4.8.5
    conda-build version : not installed
         python version : 3.8.6.final.0
       virtual packages : __glibc=2.24
       base environment : /opt/conda  (writable)
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /opt/conda/pkgs
                          /root/.conda/pkgs
       envs directories : /opt/conda/envs
                          /root/.conda/envs
               platform : linux-64
             user-agent : conda/4.8.5 requests/2.24.0 CPython/3.8.6 Linux/4.19.76-linuxkit debian/9 glibc/2.24
                UID:GID : 0:0
             netrc file : None
           offline mode : False
@xylar
Copy link
Contributor

xylar commented Oct 16, 2020

@lwasser, it looks like you might be trying to use the base environment, rather than creating another environment and calling conda activate <evn_name>. If that is the case, there may be some important environment variables that don't be set via conda activate. Perhaps that's a red herring and @ocefpaf has another thought.

@xylar
Copy link
Contributor

xylar commented Oct 16, 2020

adding libgeos using: apt-get install libgeos++-dev

You definitely want to use libgeos from the conda environment, not from the system. The versions could be different, which would cause trouble.

adding libproj apt-get install libproj-dev

Same here.

I'm pretty sure about the problem being not calling conda activate. If you are not able to create an environment other than the base, you need to set the PROJ_LIB variable manually so it points to the lib directory of your environment.

@lwasser
Copy link
Member Author

lwasser commented Oct 16, 2020

@xylar thank you. can you help me understand how i'd access / install libgeos from the conda envt? i thought it is a system based install.

we are definitely installing everything into the base envt and that has worked for us for the past few years well. i just tried conda activate and then launched Python via the CLI in the image and i'm still getting the same error.

could the order matter? should i try to install libgeos and proj before updating the base conda envt?

and can you kindly give me an example of setting the proj_lib variable? thank you.

@lwasser
Copy link
Member Author

lwasser commented Oct 16, 2020

echo echo $PROJ_LIB
returns:

/opt/conda/share/proj

and the proj4 install returned this - i stopped it as it was trying to resolve for about an hour.

(base) root@6526fb7f72d3:/# conda install -c conda-forge proj4
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.
Examining conflict for jupyter_client ptyprocess python-levenshtein pyopenssl jupyter_console click imageio monotonic ipython alembic ear/failed          

@xylar
Copy link
Contributor

xylar commented Oct 16, 2020

The package is no longer called proj4, it is now called proj, and proj4 is incompatible with proj so you can't install that.

It's good that the $PROJ_LIB variable is set to the right path. I guess that would have resulted in a different error than what you are seeing.

we are definitely installing everything into the base envt and that has worked for us for the past few years well. i just tried conda activate and then launched Python via the CLI in the image and i'm still getting the same error.

The fact that $PROJ_LIB is set does suggest maybe the activation isn't the problem, though I'm still a bit concerned.

could the order matter? should i try to install libgeos and proj before updating the base conda envt?

No, I am quite sure the order of installing packages doesn't matter. You don't want to be installing the packages with apt-get, you want to be using conda create or (less preferable) conda install to install everything you need. This seems to be what you are doing.

Ideally, you might want to switch to creating the whole conda environment in one go with conda create instead of conda install. Could you try changing to that, say change your conda install ... conda create --name test ..., followed by conda activate test and see if that works better? By including cartopy you will get a compatible proj and libgeos automatically, so you don't need to do anything there yourself.

Could you also list the /opt/conda/lib folder and see if libproj.so.19 is in fact there (or if there's a different version perhaps)?

@ocefpaf
Copy link
Member

ocefpaf commented Oct 16, 2020

I don't have much to add on what @xylar already mentioned here. But I can take a look at your Docker image/Dockerfile if you have it around.

By including cartopy you will get a compatible proj and libgeos automatically, so you don't need to do anything there yourself.

Also, I'd try this first.

@xylar
Copy link
Contributor

xylar commented Oct 16, 2020

@lwasser, I'm trying to do a local conda create with the conda install command from the Docker file at https://github.com/earthlab/r-python-eds-lessons-env/blob/master/Dockerfile.

On the command line, I get trouble if I don't have "earthpy>=0.9.2", "papermill=>2.1.0" and "traitlets>4.4" in quotation marks. I'm not very familiar with Docker files so maybe that's not an issue but that might be worth adding just in case...

@xylar
Copy link
Contributor

xylar commented Oct 16, 2020

Okay, I did a local install:

conda create -y -n test     python=3.8     r-base=3.5     autopep8     cartopy     cenpy     climata     contextily     descartes     "earthpy>=0.9.2"     elevation     folium     branca=0.3.1     geocoder     geojson     geopandas     geopy     hydrofunctions     mapboxgl     mapclassify     nano     nbclean     nc-time-axis     netcdf4     nltk     "papermill=>2.1.0"     pyproj     pyqt     pysal     r-codetools     r-rcolorbrewer     r-cowplot     r-cyphr     r-curl     r-devtools     r-dplyr     r-dygraphs     r-ff     r-ggmap     r-ggplot2     r-ggsn     r-gridextra     r-knitr     r-lemon     r-magick     r-mapdata     r-maps     r-maptools     r-microbenchmark     r-plotly     r-r.utils     r-raster     r-rastervis     r-rgdal     r-rgeos     r-rjsonio     r-rmarkdown     r-rsaga     r-rtweet     r-sf     r-stringr     r-widyr     r-tm     r-igraph     r-leaflet     r-lubridate     r-rcurl     r-ggraph     r-ggthemes     r-gganimate     r-readr     r-webshot     r-zoo     rasterio     rasterstats     richdem     scikit-image     scikit-learn     shapely     textblob     "traitlets>4.4"     tweepy     xarray

conda activate test
python -c "import cartopy"

And I get the same as you:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/xylar/miniconda3/envs/test/lib/python3.8/site-packages/cartopy/__init__.py", line 96, in <module>
    import cartopy.crs
  File "/home/xylar/miniconda3/envs/test/lib/python3.8/site-packages/cartopy/crs.py", line 36, in <module>
    from cartopy._crs import (CRS, Geodetic, Globe, PROJ4_VERSION,
ImportError: libproj.so.19: cannot open shared object file: No such file or directory

I'll look into it and see what I can figure out. Thanks for bringing this to our attention!

@xylar
Copy link
Contributor

xylar commented Oct 16, 2020

I can install cartopy on its own and I don't see this problem so there must be some interaction with one of the other packages that is causing trouble. I'll try to see if I can narrow down which.

@ocefpaf
Copy link
Member

ocefpaf commented Oct 16, 2020

I guess some old unpinned package is in there :-(
Maybe just upgrading r-base, if we can, could solve this. We would still need to track the bad pinned package and remove it.

@xylar
Copy link
Contributor

xylar commented Oct 16, 2020

I can reproduce the problem with just:

conda create -y -n test python=3.8 cartopy=0.18.0 proj=6.3.1
conda activate test
python -c "import cartopy"

So presumably an incompatibility there?

@ocefpaf
Copy link
Member

ocefpaf commented Oct 16, 2020

Awesome! Thanks @xylar!! I'll check the packages in that installation and see what's wrong with pins.

@xylar
Copy link
Contributor

xylar commented Oct 16, 2020

@ocefpaf, I think the problem is what you fixed in #91

We need to mark previous builds as broken or back-patch them to have proj pins :-( 😭😭😭

@xylar
Copy link
Contributor

xylar commented Oct 16, 2020

I messed it up somehow in #88

@lwasser
Copy link
Member Author

lwasser commented Oct 16, 2020

Thank you both so much. @xylar and @ocefpaf just a note - when i tried to run

conda create -y -n test python=3.8 cartopy=0.18.0 proj (proj 6.3.1 wasn't found)
i got a conflict message as follows:

(earth-analytics-python) CIRES-EL-DM-041:climate-data-101-training leahwasser$ conda create -y -n test python=3.8 cartopy=0.18.0 proj
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
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 libcxxabi conflicts for:
python=3.8 -> libcxx[version='>=4.0.1'] -> libcxxabi==4.0.1[build='hebd6815_0|hcfea43d_1']
proj -> libcxx[version='>=4.0.1'] -> libcxxabi==4.0.1[build='hebd6815_0|hcfea43d_1']

Package ncurses conflicts for:
python=3.8 -> readline[version='>=7.0,<8.0a0'] -> ncurses[version='6.0.*|>=6.0,<7.0a0']
python=3.8 -> ncurses[version='>=6.1,<7.0a0|>=6.2,<7.0a0']

Package python conflicts for:
cartopy=0.18.0 -> python[version='>=3.6,<3.7.0a0|>=3.7,<3.8.0a0']
cartopy=0.18.0 -> matplotlib -> python[version='>=2.7,<2.8.0a0|>=3.5,<3.6.0a0|>=3.8,<3.9.0a0|>=3.6']
python=3.8

Package sqlite conflicts for:
python=3.8 -> sqlite[version='>=3.30.0,<4.0a0|>=3.30.1,<4.0a0|>=3.31.1,<4.0a0|>=3.32.3,<4.0a0']
cartopy=0.18.0 -> proj[version='>=6.2.1,<6.2.2.0a0'] -> sqlite[version='>=3.20.1,<4.0a0|>=3.22.0,<4.0a0|>=3.23.1,<4.0a0|>=3.24.0,<4.0a0|>=3.25.2,<4.0a0|>=3.26.0,<4.0a0|>=3.29.0,<4.0a0|>=3.30.1,<4.0a0|>=3.33.0,<4.0a0|>=3.31.1,<4.0a0|>=3.27.2,<4.0a0|>=3.25.3,<4.0a0']
proj -> sqlite[version='>=3.30.1,<4.0a0|>=3.31.1,<4.0a0']

Package proj conflicts for:
cartopy=0.18.0 -> proj[version='>=6.2.1,<6.2.2.0a0']
proj

if i can be helpful here in any way please let me know but again thank you both!!

@ocefpaf
Copy link
Member

ocefpaf commented Oct 16, 2020

We need to mark previous builds as broken or back-patch them to have proj pins :-(

Marking them as broken is easier for now and can be reversed once we to a repodata patch.

@xylar
Copy link
Contributor

xylar commented Oct 16, 2020

@lwasser, do you maybe not have conda-forge added as a channel? Otherwise, I can't understand the conflicts you're seeing.

@xylar
Copy link
Contributor

xylar commented Oct 16, 2020

I messed it up somehow in #88

Somewhat in my defense, Upstream doesn't list proj as a dependency anywhere:
https://github.com/SciTools/cartopy/tree/v0.18.0/requirements

I was following their lead.

@lwasser
Copy link
Member Author

lwasser commented Oct 16, 2020

hi @xylar my apologies. i fixed it and now can see the issue - cartopy doesn't install correctly.

@xylar
Copy link
Contributor

xylar commented Oct 16, 2020

@lwasser, once we fix this, you are likely to have other conflicts in your packages. Something was causing the package solver to try to install an old version of proj, and we should see if we can figure out why. I deleted my test environment that had all of your packages but I will try to create it again to see if I can figure it out. There is a handy package called conda-tree that is helpful for debugging dependencies.

@xylar
Copy link
Contributor

xylar commented Oct 16, 2020

@lwasser, so I think a part of the problem is likely to be that conda-forge is not building packages with r-base 3.5 anymore, only 3.6 and 4.0:
https://github.com/conda-forge/conda-forge-pinning-feedstock/blob/master/recipe/conda_build_config.yaml#L616-L618

I suspect you would have considerably better luck with your docker build if you are able to update to 3.6. Would that work for you?

@xylar
Copy link
Contributor

xylar commented Oct 16, 2020

The following worked for me:

conda create -y -n test \
    python=3.8 \
    "proj>=7" \
    r-base=3.6 \
    autopep8 \
    cartopy \
    cenpy \
    climata \
    contextily \
    descartes \
    "earthpy>=0.9.2" \
    elevation \
    folium \
    branca=0.3.1 \
    geocoder \
    geojson \
    geopandas \
    geopy \
    hydrofunctions \
    mapboxgl \
    mapclassify \
    nano \
    nbclean \
    nc-time-axis \
    netcdf4 \
    nltk \
    "papermill=>2.1.0" \
    pyproj \
    pyqt \
    pysal \
    r-codetools \
    r-rcolorbrewer \
    r-cowplot \
    r-cyphr \
    r-curl \
    r-devtools \
    r-dplyr \
    r-dygraphs \
    r-ff \
    r-ggmap \
    r-ggplot2 \
    r-ggsn \
    r-gridextra \
    r-knitr \
    r-lemon \
    r-magick \
    r-mapdata \
    r-maps \
    r-maptools \
    r-microbenchmark \
    r-plotly \
    r-r.utils \
    r-raster \
    r-rastervis \
    r-rgdal \
    r-rgeos \
    r-rjsonio \
    r-rmarkdown \
    r-rsaga \
    r-rtweet \
    r-sf \
    r-stringr \
    r-widyr \
    r-tm \
    r-igraph \
    r-leaflet \
    r-lubridate \
    r-rcurl \
    r-ggraph \
    r-ggthemes \
    r-gganimate \
    r-readr \
    r-webshot \
    r-zoo \
    rasterio \
    rasterstats \
    richdem \
    scikit-image \
    scikit-learn \
    shapely \
    textblob \
    "traitlets>4.4" \
    tweepy \
    xarray

conda activate test
python -c "import cartopy"
conda deactivate

Whereas I wasn't able to install r-ggplot2 anymore when I still had r-base=3.5 but after adding proj >=7 as a dependency, which I think you almost certainly need.

@lwasser
Copy link
Member Author

lwasser commented Oct 16, 2020

@xylar i can absolutely update r.

can you tell me "proj>=7" in quotes. what is this doing? i am going to try this now

@lwasser
Copy link
Member Author

lwasser commented Oct 16, 2020

i am fine with moving to r version 4.x too... but trying 3.6 now locally

@xylar
Copy link
Contributor

xylar commented Oct 16, 2020

can you tell me "proj>=7" in quotes. what is this doing? i am going to try this now

The quotes are necessary when I'm running on the Linux command line because otherwise the stuff gets redirected to a file called =7 (and it's a mess because I can't figure out what's going wrong). You probably don't need the quotes. But proj wasn't part of your installation and getting an old version is what was causing trouble with cartopy. We'll try to mark the build of cartopy 0.18.0 that cause the problem for you but until we do, you would be safer if you make sure you get one of the latest versions of proj, thus the recommendation that you add that requirement.

i can absolutely update r.

Oh, great! That'll help with these conflicts considerably.

i am fine with moving to r version 4.x too... but trying 3.6 now locally

I'm not a r guy but I'd guess it would be good to try 4.0 if there's not a strong reason not to.

Fingers crossed.

@lwasser
Copy link
Member Author

lwasser commented Oct 16, 2020

ok!! thank you @xylar i'm working on these updates now. Bumping to r 3.6 fixed a lot! i'm going to add proj as you mention too now but it all works locally now.

i'll work on bumping to r version 4.x as well! we have some older lessons that i suspect may fail but at some point we will need to update those anyway! thank you again!

@xylar
Copy link
Contributor

xylar commented Oct 19, 2020

I believe the issue of cartopy installing incorrectly with an older version of proj has been addressed by conda-forge/admin-requests#145. Please re-open if not.

@xylar xylar closed this as completed Oct 19, 2020
@lwasser
Copy link
Member Author

lwasser commented Oct 19, 2020

thank you again, @xylar and @ocefpaf !!!

xylar added a commit to E3SM-Project/e3sm-unified that referenced this issue Oct 28, 2020
The cartopy package that worked with proj 7.0.0 was marked as
broken because proj wasn't being explicitly pinned to a compatible
version (conda-forge/cartopy-feedstock#93).
As a result, there is no build of cartopy 0.18.0 that works with
proj 7.0.0.
@lwasser
Copy link
Member Author

lwasser commented Oct 28, 2020

hi again @xylar and @ocefpaf i'm running into another environment issue - it is not specific to cartopy - but it is in my same docker image. i've actually removed all of the r installs locally to simplify and still get a really significant amount of dep conflicts.

the only change that i made to the environment was to add rioxarray. I see that you may be working on something today xylar given that reference above. suggestions as to how i can pin down where the conflicts are starting?

this is my failed build - earthlab/r-python-eds-lessons-env#39
and the list of conflicts is long. I'm trying now to rebuild a simpler version of the image and can add more specific errors once it's done.

here is just the beginning of the erros when building the entire image with r and python

The following specifications were found to be incompatible with each other:
Output in format: Requested package -> Available versions
Package openssl conflicts for:
earthpy -> python[version='>=3'] -> openssl[version='1.0.*|>=1.0.2o,<1.0.3a|>=1.0.2p,<1.0.3a|>=1.1.1a,<1.1.2a|>=1.1.1d,<1.1.2a|>=1.1.1e,<1.1.2a|>=1.1.1f,<1.1.2a|>=1.1.1g,<1.1.2a|>=1.1.1h,<1.1.2a|>=1.1.1c,<1.1.2a|>=1.1.1b,<1.1.2a|>=1.0.2n,<1.0.3a|>=1.0.2m,<1.0.3a|>=1.0.2l,<1.0.3a']
r-maps -> r-base[version='>=3.4.1,<3.4.2.0a0'] -> openssl[version='>=1.0.2o,<1.0.3a']
r-cowplot -> r-base[version='>=3.4.1,<3.4.2.0a0'] -> openssl[version='>=1.0.2o,<1.0.3a']
folium -> python[version='>=3.5'] -> openssl[version='1.0.*|>=1.0.2o,<1.0.3a|>=1.0.2p,<1.0.3a|>=1.1.1a,<1.1.2a|>=1.1.1d,<1.1.2a|>=1.1.1e,<1.1.2a|>=1.1.1f,<1.1.2a|>=1.1.1g,<1.1.2a|>=1.1.1h,<1.1.2a|>=1.1.1c,<1.1.2a|>=1.1.1b,<1.1.2a|>=1.0.2n,<1.0.3a|>=1.0.2m,<1.0.3a|>=1.0.2l,<1.0.3a']
r-rcurl -> libcurl[version='>=7.69.1,<8.0a0'] -> openssl[version='1.0.*|>=1.0.2o,<1.0.3a|>=1.0.2p,<1.0.3a|>=1.1.1a,<1.1.2a|>=1.1.1d,<1.1.2a|>=1.1.1f,<1.1.2a|>=1.1.1g,<1.1.2a|>=1.1.1h,<1.1.2a|>=1.1.1c,<1.1.2a|>=1.1.1b,<1.1.2a|>=1.0.2m,<1.0.3a|>=1.0.2n,<1.0.3a']
netcdf4 -> hdf5[version='>=1.10.6,<1.10.7.0a0'] -> openssl[version='1.0.*|>=1.0.2o,<1.0.3a|>=1.0.2p,<1.0.3a|>=1.1.1a,<1.1.2a|>=1.1.1g,<1.1.2a|>=1.1.1h,<1.1.2a|>=1.1.1d,<1.1.2a|>=1.1.1b,<1.1.2a|>=1.1.1e,<1.1.2a|>=1.1.1c,<1.1.2a|>=1.1.1f,<1.1.2a|>=1.0.2n,<1.0.3a|>=1.0.2m,<1.0.3a|>=1.0.2l,<1.0.3a']
r-webshot -> r-base[version='>=3.4.1,<3.4.2.0a0'] -> openssl[version='>=1.0.2o,<1.0.3a']
r-lubridate -> r-base[version='>=3.4.1,<3.4.2.0a0'] -> openssl[version='>=1.0.2o,<1.0.3a']
r-rcolorbrewer -> r-base[version='>=3.4.1,<3.4.2.0a0'] -> openssl[version='>=1.0.2o,<1.0.3a']
geopandas -> python[version='>=3.5'] -> openssl[version='1.0.*|>=1.0.2o,<1.0.3a|>=1.0.2p,<1.0.3a|>=1.1.1a,<1.1.2a|>=1.1.1d,<1.1.2a|>=1.1.1e,<1.1.2a|>=1.1.1f,<1.1.2a|>=1.1.1g,<1.1.2a|>=1.1.1h,<1.1.2a|>=1.1.1c,<1.1.2a|>=1.1.1b,<1.1.2a|>=1.0.2n,<1.0.3a|>=1.0.2m,<1.0.3a|>=1.0.2l,<1.0.3a']
regionmask -> python[version='>=2.7'] -> openssl[version='1.0.*|>=1.0.2o,<1.0.3a|>=1.0.2p,<1.0.3a|>=1.1.1a,<1.1.2a|>=1.1.1d,<1.1.2a|>=1.1.1e,<1.1.2a|>=1.1.1f,<1.1.2a|>=1.1.1g,<1.1.2a|>=1.1.1h,<1.1.2a|>=1.1.1c,<1.1.2a|>=1.1.1b,<1.1.2a|>=1.0.2n,<1.0.3a|>=1.0.2m,<1.0.3a|>=1.0.2l,<1.0.3a']
nltk -> python -> openssl[version='1.0.*|>=1.0.2o,<1.0.3a|>=1.0.2p,<1.0.3a|>=1.1.1a,<1.1.2a|>=1.1.1d,<1.1.2a|>=1.1.1e,<1.1.2a|>=1.1.1f,<1.1.2a|>=1.1.1g,<1.1.2a|>=1.1.1h,<1.1.2a|>=1.1.1c,<1.1.2a|>=1.1.1b,<1.1.2a|>=1.0.2n,<1.0.3a|>=1.0.2m,<1.0.3a|>=1.0.2l,<1.0.3a']
rasterio -> libgdal[version='>=3.1.3,<3.2.0a0'] -> openssl[version='1.0.*|>=1.0.2o,<1.0.3a|>=1.0.2p,<1.0.3a|>=1.1.1a,<1.1.2a|>=1.1.1e,<1.1.2a|>=1.1.1g,<1.1.2a|>=1.1.1h,<1.1.2a|>=1.1.1d,<1.1.2a|>=1.1.1c,<1.1.2a|>=1.1.1b,<1.1.2a|>=1.1.1f,<1.1.2a|>=1.0.2n,<1.0.3a|>=1.0.2m,<1.0.3a|>=1.0.2l,<1.0.3a']
climata -> python -> openssl[version='1.0.*|>=1.0.2o,<1.0.3a|>=1.0.2p,<1.0.3a|>=1.1.1a,<1.1.2a|>=1.1.1d,<1.1.2a|>=1.1.1e,<1.1.2a|>=1.1.1f,<1.1.2a|>=1.1.1g,<1.1.2a|>=1.1.1h,<1.1.2a|>=1.1.1c,<1.1.2a|>=1.1.1b,<1.1.2a|>=1.0.2n,<1.0.3a|>=1.0.2m,<1.0.3a|>=1.0.2l,<1.0.3a']
cffi -> python[version='>=3.6,<3.7.0a0']

note branca is pinned because of a map rendering issue - that didn't seem to cause the issue

Has anything changed that may impact this container build in the past few days? things were building well last week! thank you for any suggestions!

@lwasser
Copy link
Member Author

lwasser commented Oct 28, 2020

here is the (very beginning of) the output for when i build locally without any r stuff

UnsatisfiableError: The following specifications were found to be incompatible with a past
explicit spec that is not an explicit spec in this operation (python):

  - autopep8 -> pycodestyle[version='>=2.5.0'] -> python[version='>=3.8,<3.9.0a0']
  - autopep8 -> python[version='2.7.*|3.5.*|3.6.*|3.4.*|>=3.6,<3.7.0a0|>=2.7,<2.8.0a0|>=3.7,<3.8.0a0|>=3.5,<3.6.0a0']
  - branca=0.3.1 -> jinja2 -> python[version='2.7.*|3.5.*|3.6.*|3.4.*|>=3.7,<3.8.0a0|>=3.6,<3.7.0a0|>=2.7,<2.8.0a0|>=3.5,<3.6.0a0|>=3.9,<3.10.0a0|>=3.8,<3.9.0a0']
  - branca=0.3.1 -> python
  - cartopy -> numpy[version='>=1.16.5,<2.0a0'] -> python[version='3.7.*|3.8.*|>=3.9,<3.10.0a0|>=3.6|>=3|>=3.8.0a,<3.9.0a0']
  - cartopy -> python[version='2.7.*|3.5.*|3.6.*|>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.8,<3.9.0a0|>=3.7,<3.8.0a0|>=3.5,<3.6.0a0|3.4.*|>=2.7,<3.5']
  - cenpy -> fuzzywuzzy -> python[version='2.7.*|3.5.*|3.6.*|3.4.*|>=3.7,<3.8.0a0|>=3.6,<3.7.0a0|>=2.7,<2.8.0a0|>=3.5,<3.6.0a0|>=3.6|>=3|>=3.9,<3.10.0a0|>=3.8,<3.9.0a0']
  - cenpy -> python[version='>=3.5']
  - climata -> owslib[version='>=0.9'] -> python[version='2.7.*|3.4.*|3.5.*|3.6.*|>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3|>=3.6|>=3.5,<3.6.0a0|>=3.9,<3.10.0a0|>=3.8,<3.9.0a0']
  - climata -> python
  - contextily -> geopy -> python[version='3.6.*|>=3.6|>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.5,<3.6.0a0|>=3.9,<3.10.0a0|>=3.8,<3.9.0a0|>=2.7,<3.5']
  - contextily -> python[version='2.7.*|3.4.*|3.5.*|>=3.5']
  - descartes -> matplotlib-base -> python[version='>=3.9,<3.10.0a0']
  - descartes -> python[version='2.7.*|3.5.*|3.6.*|3.4.*|>=3.8,<3.9.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=2.7,<2.8.0a0|>=3.5,<3.6.0a0']
  - earthpy -> geopandas -> python[version='2.7.*|3.5.*|3.6.*|>=3.5|3.4.*|>=3.7,<3.8.0a0|>=3.6,<3.7.0a0|>=2.7,<2.8.0a0|>=3.5,<3.6.0a0|>=3.9,<3.10.0a0|>=3.8,<3.9.0a0']
  - earthpy -> python[version='>=3']
  - elevation -> appdirs -> python[version='2.7.*|3.5.*|3.6.*|3.4.*|>=3.5,<3.6.0a0|>=2.7,<2.8.0a0|>=3.7,<3.8.0a0|>=3.6,<3.7.0a0|>=3|>=3.9,<3.10.0a0|>=3.8,<3.9.0a0']
  - elevation -> python
  - folium -> branca[version='>=0.3.0'] -> python[version='>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3|>=3.7,<3.8.0a0|>=3.5,<3.6.0a0|>=3.9,<3.10.0a0|>=3.8,<3.9.0a0|>=3.6']
  - folium -> python[version='2.7.*|3.5.*|3.6.*|>=3.5|3.4.*']
  - geocoder -> click -> python[version='2.7.*|3.5.*|3.6.*|3.4.*|>=3|>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.5,<3.6.0a0|>=3.9,<3.10.0a0|>=3.8,<3.9.0a0']
  - geocoder -> python
  - geojson -> python[version='2.7.*|3.5.*|3.6.*|3.4.*']
  - geopandas -> fiona -> python[version='>=3.6|>=3.7|>=3.8,<3.9.0a0|>=3.9,<3.10.0a0']
  - geopandas -> python[version='2.7.*|3.5.*|3.6.*|>=3.5|3.4.*|>=3.7,<3.8.0a0|>=3.6,<3.7.0a0|>=2.7,<2.8.0a0|>=3.5,<3.6.0a0']
  - geopy -> python[version='2.7.*|3.4.*|3.5.*|3.6.*']
  - hydrofunctions -> ipython -> python[version='2.7.*|3.5.*|3.6.*|>=3.5,<3.6.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.9,<3.10.0a0|>=3.8,<3.9.0a0|>=2.7,<2.8.0a0|3.4.*']
  - hydrofunctions -> python
  - mapboxgl -> colour -> python[version='2.7.*|3.5.*|3.6.*|>=2.7,<2.8.0a0|>=3.5,<3.6.0a0|>=3.8,<3.9.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|3.4.*|>=3.9,<3.10.0a0']
  - mapboxgl -> python
  - mapclassify -> networkx -> python[version='2.7.*|3.5.*|3.6.*|>=3.6|3.4.*|>=3.7,<3.8.0a0|>=3.9,<3.10.0a0|>=3.8,<3.9.0a0']
  - mapclassify -> python[version='>=2.7,<2.8.0a0|>=3.5|>=3.5,<3.6.0a0|>=3.6,<3.7.0a0']
  - nbclean -> nbformat -> python[version='2.7.*|3.5.*|3.6.*|>=3.5|3.4.*|>=3.8,<3.9.0a0|>=3.7,<3.8.0a0|>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.5,<3.6.0a0|>=3.9,<3.10.0a0']
  - nbclean -> python
  - nbconvert=5.6.1 -> bleach -> python[version='2.7.*|3.5.*|3.6.*|3.4.*|>=3.5,<3.6.0a0|>=3.9,<3.10.0a0|>=3.5|>=3.7|3.8.*|3.7.*']
  - nbconvert=5.6.1 -> python[version='>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.8,<3.9.0a0|>=3.7,<3.8.0a0']
  - nc-time-axis -> cftime -> python[version='2.7.*|3.5.*|3.6.*|>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.9,<3.10.0a0|>=3.8,<3.9.0a0|>=3.5,<3.6.0a0|3.4.*']
  - nc-time-axis -> python
  - netcdf4 -> python[version='2.7.*|3.5.*|3.6.*|>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0|>=3.9,<3.10.0a0|>=3.5,<3.6.0a0|3.4.*']
  - netcdf4 -> python_abi=3.7[build=*_cp37m] -> python[version='3.7.*|3.8.*|3.9.*']
  - nltk -> matplotlib -> python[version='>=3.6|>=3|>=3.9,<3.10.0a0']
  - nltk -> python[version='2.7.*|3.5.*|3.6.*|3.4.*|>=3.5|>=3.8,<3.9.0a0|>=3.6,<3.7.0a0|>=2.7,<2.8.0a0|>=3.7,<3.8.0a0|>=3.5,<3.6.0a0']
  - papermill -> ansiwrap -> python[version='2.7.*|3.5.*|3.6.*|3.4.*|>=3|>=3.9,<3.10.0a0|>=3.5|3.8.*|3.7.*']
  - papermill -> python[version='>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.6|>=3.8,<3.9.0a0|>=3.7,<3.8.0a0|>=3.5,<3.6.0a0']
  - pyproj -> python[version='2.7.*|3.4.*|3.5.*|>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.9,<3.10.0a0|>=3.8,<3.9.0a0|>=3.7,<3.8.0a0|>=3.5,<3.6.0a0']
  - pyproj -> python_abi=3.9[build=*_cp39] -> python[version='3.6.*|3.9.*|3.8.*|3.7.*']
  - pyqt -> python[version='2.7.*|3.5.*|3.6.*|>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.9,<3.10.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0|>=3.5,<3.6.0a0|3.4.*']
  - pyqt -> python_abi=3.9[build=*_cp39] -> python[version='3.7.*|3.9.*|3.8.*']
  - pysal -> access[version='>=1.1.1'] -> python[version='<4.0|>3.4|>=3.5|>=3.9,<3.10.0a0|>=3.8,<3.9.0a0|>=3|>=3.4']
  - pysal -> python[version='2.7.*|3.5.*|3.6.*|>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.6|>=3.7|>=3.5,<3.6.0a0|3.4.*|>=3.7,<3.8.0a0']
  - python=3.8
  - rasterstats -> cligj[version='>=0.4'] -> python[version='<4.0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0|>=3.6,<3.7.0a0|>=2.7,<2.8.0a0|>=3.5,<3.6.0a0|>=3.9,<3.10.0a0']
  - rasterstats -> python[version='2.7.*|3.5.*|3.6.*|3.4.*']
  - regionmask -> affine -> python[version='2.7.*|3.5.*|3.6.*|3.4.*|>=3.7,<3.8.0a0|>=3.6,<3.7.0a0|>=2.7,<2.8.0a0|>=3.5,<3.6.0a0|>=3.8,<3.9.0a0|>=2.7,<3.5|>=3.5|>=3.9,<3.10.0a0|>=3.6|>=3.5.3']
  - regionmask -> python[version='>=2.7']
  - richdem -> numpy[version='>=1.14.6,<2.0a0'] -> python[version='2.7.*|3.5.*|3.6.*|>=3.5,<3.6.0a0|>=3.9,<3.10.0a0|3.4.*']
  - richdem -> python[version='>=2.7,<2.8.0a0|>=3.8,<3.9.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0']
  - rioxarray -> pyproj[version='>=2'] -> python[version='2.7.*|3.5.*|3.6.*|>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.9,<3.10.0a0|>=3.8,<3.9.0a0|>=3.7,<3.8.0a0|>=3.5,<3.6.0a0|3.4.*|>=3.6|>=3.5.3|>=3.5']
  - rioxarray -> python=3
  - scikit-image -> cloudpickle[version='>=0.2.1'] -> python[version='3.7.*|>=3.6|>=3|>=3.5|>=3.9,<3.10.0a0|>=3.7|3.8.*']
  - scikit-image -> python[version='2.7.*|3.5.*|3.6.*|>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0|>=3.5,<3.6.0a0|3.4.*']
  - scikit-learn -> joblib[version='>=0.11'] -> python[version='3.7.*|>=3.5|>=3.6|>=3.9,<3.10.0a0|3.8.*']
  - scikit-learn -> python[version='2.7.*|3.5.*|3.6.*|>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0|>=3.5,<3.6.0a0|3.4.*']
  - shapely -> python[version='2.7.*|3.5.*|3.6.*|>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.8,<3.9.0a0|>=3.7,<3.8.0a0|>=3.9,<3.10.0a0|>=3.5,<3.6.0a0|3.4.*']
  - shapely -> python_abi=3.8[build=*_cp38] -> python[version='3.7.*|3.8.*|3.9.*']
  - textblob -> nltk[version='>=3.1'] -> python[version='>=2.7,<2.8.0a0|>=3.5|>=3.8,<3.9.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.5,<3.6.0a0']
  - textblob -> python[version='2.7.*|3.5.*|3.6.*|3.4.*']
  - traitlets=4.3.3 -> decorator -> python[version='2.7.*|3.5.*|3.6.*|3.4.*|>=3.5,<3.6.0a0|3.8.*|>=3.9,<3.10.0a0|3.7.*']
  - traitlets=4.3.3 -> python[version='>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.8,<3.9.0a0|>=3.7,<3.8.0a0']
  - tweepy -> pysocks[version='>=1.5.7'] -> python[version='3.4.*|>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0|>=3.9,<3.10.0a0|>=3.5,<3.6.0a0']
  - tweepy -> python[version='2.7.*|3.5.*|3.6.*']

The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

Package readline conflicts for:
conda-package-handling -> python[version='>=3.7,<3.8.0a0'] -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.*|7.0.*']
urllib3 -> python[version='<4.0'] -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.0.*|7.*']
climata -> python -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.0.*|7.*']
rioxarray -> python=3 -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.*|7.0.*']
pycosat -> python[version='>=3.6,<3.7.0a0'] -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.*|7.0.*']
ruamel_yaml -> python[version='>=3.7,<3.8.0a0'] -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.*|7.0.*']
pyproj -> python[version='>=3.9,<3.10.0a0'] -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.*|7.0.*']
branca=0.3.1 -> python -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.0.*|7.*']
geocoder -> python -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.0.*|7.*']
pyqt -> python[version='>=3.9,<3.10.0a0'] -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.*|7.0.*']
proj -> sqlite[version='>=3.33.0,<4.0a0'] -> readline[version='>=8.0,<9.0a0']
geopandas -> python[version='>=3.5'] -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.*|7.0.*']
nbconvert=5.6.1 -> python[version='>=3.6,<3.7.0a0'] -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.*|7.0.*']
cffi -> python[version='>=3.6,<3.7.0a0'] -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.*|7.0.*']
idna -> python -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.0.*|7.*']
netcdf4 -> python[version='>=3.7,<3.8.0a0'] -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.*|7.0.*']
richdem -> python[version='>=3.8,<3.9.0a0'] -> readline[version='6.2.*|7.0|7.0.*|>=7.0,<8.0a0|>=8.0,<9.0a0|7.*']
requests -> python -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.0.*|7.*']
sqlite -> readline[version='6.2.*|7.0|7.0.*|>=7.0,<8.0a0|>=8.0,<9.0a0']
mapboxgl -> python -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.0.*|7.*']
pyopenssl -> python -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.0.*|7.*']
descartes -> python -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.0.*|7.*']
elevation -> python -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.0.*|7.*']
asn1crypto -> python -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.0.*|7.*']
geopy -> python -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.0.*|7.*']
cartopy -> python[version='>=3.6,<3.7.0a0'] -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.*|7.0.*']
rasterstats -> python -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.0.*|7.*']
readline
contextily -> python[version='>=3.5'] -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.*|7.0.*']
nc-time-axis -> python -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.0.*|7.*']
certifi -> python[version='>=3.6,<3.7.0a0'] -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.*|7.0.*']
folium -> python[version='>=3.5'] -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.*|7.0.*']
nbclean -> python -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.0.*|7.*']
setuptools -> python[version='>=3.9,<3.10.0a0'] -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.*|7.0.*']
pycparser -> python -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.0.*|7.*']
chardet -> python[version='>=3.6,<3.7.0a0'] -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.*|7.0.*']
textblob -> python -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.0.*|7.*']
traitlets=4.3.3 -> python[version='>=3.8,<3.9.0a0'] -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.*|7.0.*']
six -> python -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.0.*|7.*']
pip -> python[version='>=3'] -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.*|7.0.*']
conda[version='>=4.9.1'] -> python[version='>=3.6,<3.7.0a0'] -> readline[version='6.2.*|7.0|>=7.0,<8.0a0|>=8.0,<9.0a0|7.*']
scikit-learn -> python[version='>=3.6,<3.7.0a0'] -> readline[version='

@xylar
Copy link
Contributor

xylar commented Oct 29, 2020

@lwasser, I think the problem is that your miniconda environment is now python 3.9, rather than python 3.9. You specify python=3.8 but python is already installed in your miniconda environment and I don't believe it is getting downgraded to python 3.8 as you are requesting, or at least the package solver is looking for python 3.9 packages.

I would suggest one of a two approaches:

  1. You could first downgrade python to 3.8 in your base miniconda environment before installing the rest of the packages. Just make conda install -y python=3.8 its own line
  2. change your conda install to a conda create --name <env_name> and then activate that environment. This is how I always work. It's always the safest because you know you're starting with literally no packages that could cause conflicts. Also, the conda activate step sets up environment variables that sometimes get missed otherwise, but if you were having that problem, you would know.

@lwasser
Copy link
Member Author

lwasser commented Oct 29, 2020

thank you xylar... ok so here is what i've tried so far

Just run with python 3.9 doesn't work - lots of conflicts.
I tried to create an envt file to make install simpler and it's failing at the cleanup state - saying find: paths must precede expression: RUN'`

FROM continuumio/miniconda3:4.7.12

ENV PYTHONDONTWRITEBYTECODE=true

# Only for the time being before we migrate to 3.9
#RUN conda install -y python=3.8

COPY environment.yml environment.yml

RUN conda update conda --yes \
    && conda config --add channels conda-forge \
    && conda config --set channel_priority strict \
    && conda env create -f environment.yml \
    && conda clean --all --yes --force-pkgs-dirs \
    && find /opt/conda/ -follow -type f -name '*.a' -delete \
    && find /opt/conda/ -follow -type f -name '*.pyc' -delete \
    && find /opt/conda/ -follow -type f -name '*.js.map' -delete \

RUN conda init bash \
    conda activate ea-lessons \
    && conda list


COPY import_check.py import_check.py
RUN python import_check.py

i also tried

    && conda create -n ea-lessons \
    python=3.8 \
    packages here

and it didn't like that syntax.

i'm happy to share more code / docker file examples with you but i don't want to consume your time. i just keep getting conflicts or errors.
Many thanks for any suggestions.

@xylar
Copy link
Contributor

xylar commented Oct 29, 2020

@lwasser, could we move this discussion to an issue under your project, since it no longer relates to cartopy? I'd be happy to discuss more with you under https://github.com/earthlab/r-python-eds-lessons-env/issues

@lwasser
Copy link
Member Author

lwasser commented Oct 29, 2020

@xylar of course... i'll move more specifics there and will ping you! thank you for your time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants