cedadev / cis

Home of the Community Intercomparison Suite.
www.cistools.net
GNU Lesser General Public License v3.0
46 stars 18 forks source link

Help installing cis via Conda with Anaconda 2019.10 #25

Closed mathomp4 closed 2 years ago

mathomp4 commented 4 years ago

All,

I seem to be having issues trying to install cis in my Anaconda instance.

Now, fair warning, this is an Anaconda stack I manage for an organization I work for. So it has some set packages everyone needs. I construct this setup by first getting the full Anaconda installer, then doing some conda install and then some conda install -c conda-forge commands.

So, by the time I get here I've already done a lot of conda install -c conda-forge statements. And, in the past (say with Anaconda 2019.03), I just added conda install -c conda-forge cis to that as well.

But with 2019.10, I get this:

$ ./2019.10_py3.7/2019-11-13/bin/conda install -c conda-forge cis
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: / failed

And it spins there for hours. So I thought, well, conda gets confused sometimes, so I tried pip:

$ ./2019.10_py3.7/2019-11-13/bin/python3 -m pip install cis
Collecting cis
  Using cached https://files.pythonhosted.org/packages/09/03/28b9a253e5e7c88819dad74227a906b59f4035bfed7f0c8261722cfa3a8c/cis-1.6.0.tar.gz
Requirement already satisfied: matplotlib>=1.2.0 in ./2019.10_py3.7/2019-11-13/lib/python3.7/site-packages (from cis) (3.1.1)
Requirement already satisfied: netcdf4>=1.0 in ./2019.10_py3.7/2019-11-13/lib/python3.7/site-packages (from cis) (1.4.2)
Requirement already satisfied: numpy in ./2019.10_py3.7/2019-11-13/lib/python3.7/site-packages (from cis) (1.17.2)
Requirement already satisfied: scipy>=0.15.0 in ./2019.10_py3.7/2019-11-13/lib/python3.7/site-packages (from cis) (1.3.1)
Collecting iris>=1.8.0 (from cis)
  ERROR: Could not find a version that satisfies the requirement iris>=1.8.0 (from cis) (from versions: none)
ERROR: No matching distribution found for iris>=1.8.0 (from cis)

The odd thing is, I have iris 2.2.0 from conda:

$ ./2019.10_py3.7/2019-11-13/bin/conda list | grep iris
iris                      2.2.0                 py37_1003    conda-forge

Now, I did try to short circuit this and make cis the first big conda-forge package I installed after:

$ANACONDA_BINDIR/conda install -y netcdf4 cartopy cubes krb5 \
   pyasn1 redis redis-py ujson mdp configobj blaze argcomplete biopython \
   sockjs-tornado sphinx_rtd_theme virtualenv django mock psycopg2 \
   requests-toolbelt twine wxpython configargparse \
   xarray geotiff gdal plotly theano

but even that is stuck in perpetual solve.

Any ideas with what might be going on?

mathomp4 commented 4 years ago

Final test. I just did this:

bash $ANACONDA_SRCDIR/$INSTALLER -b -p $ANACONDA_INSTALLDIR
conda install -c conda-forge cis

Here the conda install is the next step after just installing anaconda, and it seems like it can't install even then. Hmm.

duncanwp commented 4 years ago

I've noticed a similar problem recently, but haven't managed to pin it down. I've found that creating a new environment seems to work: conda create -n cis_env -c conda-forge cis. It's presumably due to a set of conflicting requirements somewhere, perhaps iris pinning to an older version of matplotlib, but without any useful output from conda it's hard to fix.

The pip issue is because the older version of CIS on PyPi refers to the iris package rather than the, correct, scitools-iris package. I really should update the version on PyPi, but in the meantime you can clone the latest version of CIS locally and install using pip install -e .

duncanwp commented 2 years ago

Closing as stale and I suspect fixed by latest rebuild. Please reopen if it's still an issue for you

Astroraf commented 1 year ago

I am getting an issue when I do pip install cis, it gives me this error: Getting requirements to build wheel ... error error: subprocess-exited-with-error. Not sure what to do as I haven't found many solutions to this error.

duncanwp commented 1 year ago

Hmm, I'm not sure why that would happen - I've not had it myself. You could try increasing the verbosity of pip to see what's going on, e.g.: pip install cis -v

Alternatively I would usually suggest installing cis using conda since some of the dependencies of iris and cartopy are tricky to get working with pip in my experience. See the docs here: https://cis.readthedocs.io/en/stable/installation.html