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

Trouble installing requirements.txt #19

Closed
dug20 opened this issue Dec 27, 2020 · 6 comments
Closed

Trouble installing requirements.txt #19

dug20 opened this issue Dec 27, 2020 · 6 comments

Comments

@dug20
Copy link
Collaborator

dug20 commented Dec 27, 2020

I ran pip install -r requirements.txt, and got the following error when it tried to install scitools_iris==2.4.0

The same problem appears when I run pip install scitools-iris.

Collecting cartopy
  Using cached Cartopy-0.18.0.tar.gz (14.4 MB)
    ERROR: Command errored out with exit status 1:
     command: 'D:\anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Daniel\\AppData\\Local\\Temp\\pip-install-02lbfyqf\\cartopy\\setup.py'"'"'; __file__='"'"'C:\\Users\\Daniel\\AppData\\Local\\Temp\\pip-install-02lbfyqf\\cartopy\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Daniel\AppData\Local\Temp\pip-pip-egg-info-fkoiu6vb'
         cwd: C:\Users\Daniel\AppData\Local\Temp\pip-install-02lbfyqf\cartopy\
    Complete output (3 lines):
    C:\Users\Daniel\AppData\Local\Temp\pip-install-02lbfyqf\cartopy\setup.py:104: UserWarning: Unable to determine GEOS version. Ensure you have 3.3.3 or later installed, or installation may fail.
      warnings.warn(
    Proj 4.9.0 must be installed.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
@dug20
Copy link
Collaborator Author

dug20 commented Dec 27, 2020

The solution seems to be to run the following in Anaconda Prompt:
conda install -c scitools cartopy

Not sure if there's a way to install requirements.txt using conda instead of pip?

https://gist.github.com/luiscape/19d2d73a8c7b59411a2fb73a697f5ed4#file-install_packages-sh

@dug20 dug20 closed this as completed Dec 27, 2020
@dug20 dug20 pinned this issue Dec 27, 2020
@dug20 dug20 reopened this Dec 27, 2020
@dug20
Copy link
Collaborator Author

dug20 commented Dec 27, 2020

You can try (in Anaconda Prompt):
conda config --append channels conda-forge
conda install --file requirements.txt

But this doesn't work completely.

@jagoosw
Copy link
Member

jagoosw commented Dec 27, 2020

I had to manually install some C++ dependency for Iris. I'll try finding out what it was in a sec

@dug20
Copy link
Collaborator Author

dug20 commented Dec 27, 2020

If you use conda it will automatically install all the depencies for iris.

Using Anaconda prompt you just need to run each of the following manually:

conda install -c scitools iris
conda install -c conda-forge metpy
conda install -c uvcdat thermo
pip install ambiance

And that should install all the necessary modules you need for everything

@jagoosw
Copy link
Member

jagoosw commented Dec 27, 2020

Found it. Need to install this dependency by:
brew install eccodes
then:
pip install eecodes iris iris_grib

More info: https://pypi.org/project/eccodes/

Also I don't think brew is a thing on windows?

@jagoosw
Copy link
Member

jagoosw commented Dec 27, 2020

Oops only just read your reply. The error message at the top is what I was getting when hadn't done that dependancy but idk why pip doesn't do it if conda does

@dug20 dug20 closed this as completed Dec 27, 2020
@dug20 dug20 changed the title Trouble installing scitools_iris Trouble installing requirements.txt Jan 12, 2021
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

2 participants