conda-forge / cartopy-feedstock

A conda-smithy repository for cartopy.
BSD 3-Clause "New" or "Revised" License
4 stars 16 forks source link

Problems installing cartopy 0.18.0b1 #77

Closed xylar closed 4 years ago

xylar commented 4 years ago

From https://gitter.im/SciTools/cartopy

@mymindisopen Feb 14 22:49 ... Do I need to build from source in order to try beta or can I do it with conda?

@xylar Feb 17 21:26 @mymindisopen, you can now install cartopy 0.18.0b1 with:

conda install -c conda-forge/label/cartopy_dev cartopy

@mymindisopen 03:00 Thank you, sir. It's weird, I have the same installation of conda on both my PC and laptop. With the command you provide, my PC installs cartopy 0.18.0b1 just fine, but my laptop installs 0.17 with the same command.

@mymindisopen 03:07 (same installation meaning same conda version and same python version)

@mymindisopen 04:33 When I try to specifically

conda install -c conda-forge/label/cartopy_dev cartopy=0.18.0b1

My laptops gives me :

UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  - cartopy=0.18.0b1 -> python[version='>=2.7,<2.8.0a0|>=3.5,<3.6.0a0']

Your python: python=3.7

Although I have the same python version on my PC.

xylar commented 4 years ago

@mymindisopen, I was able to create a test environment with python 3.7 and cartopy 0.18.0b1 as follows:

conda create -y -n test python=3.7
conda activate test
conda install -c conda-forge/label/cartopy_dev cartopy=0.18.0b1

conda list:

$ conda list
# packages in environment at /home/xylar/miniconda3/envs/test:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       0_gnu    conda-forge
ca-certificates           2019.11.28           hecc5488_0    conda-forge
cartopy                   0.18.0b1         py37h88e1628_0    conda-forge/label/cartopy_dev
certifi                   2019.11.28               py37_0    conda-forge
cffi                      1.13.2           py37h8022711_0    conda-forge
chardet                   3.0.4                 py37_1003    conda-forge
cryptography              2.8              py37h72c5cf5_1    conda-forge
cycler                    0.10.0                     py_2    conda-forge
freetype                  2.10.0               he983fc9_1    conda-forge
geos                      3.8.0                he1b5a44_0    conda-forge
icu                       64.2                 he1b5a44_1    conda-forge
idna                      2.8                   py37_1000    conda-forge
jpeg                      9c                h14c3975_1001    conda-forge
kiwisolver                1.1.0            py37hc9558a2_0    conda-forge
ld_impl_linux-64          2.33.1               h53a641e_8    conda-forge
libblas                   3.8.0               14_openblas    conda-forge
libcblas                  3.8.0               14_openblas    conda-forge
libffi                    3.2.1             he1b5a44_1006    conda-forge
libgcc-ng                 9.2.0                h24d8f2e_2    conda-forge
libgfortran-ng            7.3.0                hdf63c60_5    conda-forge
libgomp                   9.2.0                h24d8f2e_2    conda-forge
liblapack                 3.8.0               14_openblas    conda-forge
libopenblas               0.3.7                h5ec1e0e_6    conda-forge
libpng                    1.6.37               hed695b0_0    conda-forge
libstdcxx-ng              9.2.0                hdf63c60_2    conda-forge
libtiff                   4.1.0                hc3755c2_3    conda-forge
lz4-c                     1.8.3             he1b5a44_1001    conda-forge
matplotlib-base           3.1.3            py37h250f245_0    conda-forge
ncurses                   6.1               hf484d3e_1002    conda-forge
numpy                     1.18.1           py37h95a1406_0    conda-forge
olefile                   0.46                       py_0    conda-forge
openssl                   1.1.1d               h516909a_0    conda-forge
owslib                    0.19.1                     py_0    conda-forge
pillow                    7.0.0            py37hefe7db6_0    conda-forge
pip                       20.0.2                     py_2    conda-forge
proj                      6.3.0                hc80f0dc_0    conda-forge
pycparser                 2.19                     py37_1    conda-forge
pyepsg                    0.4.0                      py_0    conda-forge
pykdtree                  1.3.1           py37hc1659b7_1002    conda-forge
pyopenssl                 19.1.0                   py37_0    conda-forge
pyparsing                 2.4.6                      py_0    conda-forge
pyproj                    2.4.2.post1      py37h8ff28aa_1    conda-forge
pyshp                     2.1.0                      py_0    conda-forge
pysocks                   1.7.1                    py37_0    conda-forge
python                    3.7.6                h357f687_2    conda-forge
python-dateutil           2.8.1                      py_0    conda-forge
pytz                      2019.3                     py_0    conda-forge
readline                  8.0                  hf8c457e_0    conda-forge
requests                  2.22.0                   py37_1    conda-forge
scipy                     1.4.1            py37h921218d_0    conda-forge
setuptools                45.2.0                   py37_0    conda-forge
shapely                   1.7.0            py37h5d51c17_0    conda-forge
six                       1.14.0                   py37_0    conda-forge
sqlite                    3.30.1               hcee41ef_0    conda-forge
tk                        8.6.10               hed695b0_0    conda-forge
tornado                   6.0.3            py37h516909a_4    conda-forge
urllib3                   1.25.7                   py37_0    conda-forge
wheel                     0.34.2                     py_1    conda-forge
xz                        5.2.4             h14c3975_1001    conda-forge
zlib                      1.2.11            h516909a_1006    conda-forge
zstd                      1.4.4                h3b9ef0a_1    conda-forge

conda info:

     active environment : test
    active env location : /home/xylar/miniconda3/envs/test
            shell level : 2
       user config file : /home/xylar/.condarc
 populated config files : /home/xylar/.condarc
          conda version : 4.8.2
    conda-build version : 3.18.11
         python version : 3.7.6.final.0
       virtual packages : __glibc=2.27
       base environment : /home/xylar/miniconda3  (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 : /home/xylar/miniconda3/pkgs
                          /home/xylar/.conda/pkgs
       envs directories : /home/xylar/miniconda3/envs
                          /home/xylar/.conda/envs
               platform : linux-64
             user-agent : conda/4.8.2 requests/2.22.0 CPython/3.7.6 Linux/4.15.0-1069-oem ubuntu/18.04.4 glibc/2.27
                UID:GID : 1001:1001
             netrc file : None
           offline mode : False
xylar commented 4 years ago

@mymindisopen, could you try to repeat what I did and let me know if that works for you? If you need a more complex setup, you may need to install all of the conda-forge packages you need during the conda create step and then install or update cartopy using the conda install command above.

One suggestion would be to make sure conda is up-to-date: conda update -n base conda.

ocefpaf commented 4 years ago

You can achieve the same that @xylar mentioned above in one go:

conda create --name TEST -c conda-forge/label/cartopy_dev cartopy

We don't recommend installing dev releasing in pre-existing envs at all not only b/c of the conflicts, but you also do not want to mess up your working env.

xylar commented 4 years ago

@ocefpaf, thanks for that! I ran a very similar command earlier that included python=3.7 earlier and got complaints about python version similar to @mymindisopen but I tried again just now and it worked. Odd!

xylar commented 4 years ago

Interesting! This works:

$ conda create -y -n test -c conda-forge/label/cartopy_dev python=3.7 cartopy
...
  cartopy            conda-forge/label/cartopy_dev/linux-64::cartopy-0.18.0b1-py37h88e1628_0
...
  python             conda-forge/linux-64::python-3.7.6-h357f687_2
...

but this doesn't

$ conda create -y -n test -c conda-forge -c conda-forge/label/cartopy_dev python=3.7 cartopy=0.18.0b1
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 python conflicts for:
cartopy=0.18.0b1 -> python[version='>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0']
python=3.7
cartopy=0.18.0b1 -> numpy[version='>=1.14.6,<2.0a0'] -> python[version='2.7.*|3.5.*|3.6.*|>=3|>=3.5,<3.6.0a0|3.4.*']
Note that strict channel priority may have removed packages required for satisfiability.
anorlovsky commented 4 years ago

I tried different approaches you suggested after updating conda. If I don't explicitly specify cartopy=0.18.0b1 - it installs 0.17, but if I do - python version complaint shows up.

I'm fine now, because nighsthade started working even with 0.17.

Anyway, guys, thanks for your help, hope someone will find it useful!

stietsche commented 4 years ago

Hi @mymindisopen, I also tried the recipe by @xylar to install cartopy 0.18.0b1 into a clean test environment. It only worked after I added conda-forge as a channel:

conda config --add channels conda-forge

xylar commented 4 years ago

I think I see the problem with my earlier installs. This is what I would recommend for this package (and beta 2, which should be up shortly):

conda config --set channel_priority strict
conda create -y -n test --override-channels -c conda-forge/label/cartopy_dev \
    -c conda-forge -c defaults python=3.7 cartopy=0.18.0b1

You need to override channels if you have channel_priority set to strict because cartopy will otherwise come from conda-forge, not conda-forge/label/cartopy_dev.

xylar commented 4 years ago

I think my last suggestion should be robust but anyone still having trouble should request post and I'll reopen this issue.