Hi,
When building the docker image, I get the following error. Basically, it says the “cartopy” package needs “numpy” installed, but it get installed right before.
Collecting numpy
Downloading numpy-1.18.4-cp37-cp37m-manylinux1_x86_64.whl (20.2 MB)
Collecting cartopy
Downloading Cartopy-0.18.0.tar.gz (14.4 MB)
ERROR: Command errored out with exit status 1: command: /opt/conda/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-tpnw_7es/cartopy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-tpnw_7es/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 /tmp/pip-install-tpnw_7es/cartopy/pip-egg-info
cwd: /tmp/pip-install-tpnw_7es/cartopy/
Complete output (12 lines):
Traceback (most recent call last):
File "/tmp/pip-install-tpnw_7es/cartopy/setup.py", line 43, in <module>
import numpy as np
ModuleNotFoundError: No module named 'numpy'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-tpnw_7es/cartopy/setup.py", line 45, in <module>
raise ImportError('NumPy 1.10+ is required to install cartopy.')
ImportError: NumPy 1.10+ is required to install cartopy.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
The command '/bin/sh -c conda env update -q -f /tmp/environment.yml && /opt/conda/bin/pip install -r /tmp/requirements.txt && conda clean -y --all && conda env export -n "root"' returned a non-zero code: 1
ERROR: Job failed: exit code 1
Hi @sjinko - are you installing numpy and cartopy in the same pip install
statement?
This happens when I start a new environment on Renkulab, and the packages are getting installed as part of the requirements.txt file. I do not specify installing “cartopy”, so I think it’s a dependency from another package, I can’t figure out which one.
I get to build the Docker image if I remove everything from the requirements.txt file, but then, the create a new environment stalls on
Verifying available environments...
I also get this notification on top:
An error prevented checking integration of the project with the Knowledge Graph. Error: "Error 500"
Yes, apologies for that we are in the middle of an outage - you can follow updates on renkulab.statuspage.io
As far as your cartopy problem goes - this is due to the fact that cartopy doesn’t specify their install dependencies properly. They require numpy when the package is being installed, meaning that if numpy is installed at the same time as cartopy, it is not installed yet and cartopy’s setup.py
doesn’t see it. Try adding a line just above that installs just numpy, e.g.
RUN pip install numpy
I added RUN pip install numpy
to the requirements.txt file, but I get this:
ERROR: Invalid requirement: 'RUN pip install numpy' (from line 1 of /tmp/requirements.txt) 43 The command '/bin/sh -c conda env update -q -f /tmp/environment.yml && /opt/conda/bin/pip install -r /tmp/requirements.txt && conda clean -y --all && conda env export -n "root"' returned a non-zero code: 1 47 ERROR: Job failed: exit code 1
Even if I remove everything from the requirements.txt file, the “start a new interactive environment” gets stuck on: Loading environment parameters...
Ah sorry, I should have been more clear - you need to add that line to the Dockerfile
just before the RUN pip install -r /tmp/requirements.txt
line.
It does the trick. I get to build the Docker image, but then, it still gets stuck on Loading environment parameters...
Yes, the outage is still on-going – see 5/19/20 renkulab.io outage
Hi @sjinko renkulab.io is back to (hopefully) normal - let me know if the image build worked as expected!
Ok, I didn’t get the outage had this effect. Thanks for the help. As usual, @rrrrrok, you save the day!
1 Like