我正在尝试从dockerfile创建docker映像,但是我一直遇到此错误。
ERROR: requests-oauthlib 1.2.0 has requirement oauthlib>=3.0.0, but you'll have oauthlib 2.1.0 which is incompatible.
还有这个错误。
Building wheel for pycurl (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/pip-install-opawrne5/pycurl/setup.py'"'"'; __file__='"'"'/pip-install-opawrne5/pycurl/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /pip-wheel-lo02mho5 --python-tag cp36
cwd: /pip-install-opawrne5/pycurl/
Complete output (20 lines):
Using curl-config (libcurl 7.58.0)
Using SSL library: OpenSSL/LibreSSL/BoringSSL
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/curl
copying python/curl/__init__.py -> build/lib.linux-x86_64-3.6/curl
running build_ext
building 'pycurl' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/src
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPYCURL_VERSION="7.43.0.3" -DHAVE_CURL_SSL=1 -DHAVE_CURL_OPENSSL=1 -DHAVE_CURL_SSL=1 -I/usr/include/python3.6m -c src/docstrings.c -o build/temp.linux-x86_64-3.6/src/docstrings.o
In file included from src/docstrings.c:4:0:
src/pycurl.h:164:13: fatal error: openssl/ssl.h: No such file or directory
# include <openssl/ssl.h>
^~~~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for pycurl
我尝试通过pip install oauthlib进行安装以获得3.1,但是它仍然给我同样的错误。它甚至承认我有3.1,并在给出该错误后继续卸载它。
Installing collected packages: ptyprocess, tornado, terminado, decorator, ipython-genutils, traitlets, MarkupSafe, jinja2, Send2Trash, testpath, mistune, entrypoints, jupyter-core, attrs, pyrsistent, jsonschema, nbformat, defusedxml, webencodings, bleach, pandocfilters, pygments, nbconvert, pyzmq, jupyter-client, prometheus-client, wcwidth, prompt-toolkit, pickleshare, parso, jedi, pexpect, backcall, ipython, ipykernel, notebook, ipaddress, pyYAML, chardet, certifi, urllib3, requests, oauthlib, requests-oauthlib, pyasn1, pyasn1-modules, cachetools, rsa, google-auth, websocket-client, kubernetes, escapism, SQLAlchemy, Mako, python-editor, alembic, async-generator, pamela, pycparser, cffi, cryptography, pyopenssl, certipy, jupyterhub, jupyterhub-kubespawner, pycurl, jhub-remote-user-authenticator
Found existing installation: oauthlib 3.1.0
Uninstalling oauthlib-3.1.0:
Successfully uninstalled oauthlib-3.1.0
Found existing installation: cryptography 2.1.4
Uninstalling cryptography-2.1.4:
Successfully uninstalled cryptography-2.1.4
Running setup.py install for pycurl ... error
The docker file:
FROM tf_docker/py3tensor:v1
RUN apt-get install -y openslide-tools && apt-get install -y python-openslide
RUN pip install openslide-python && pip install dicom && pip install oauthlib
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
RUN apt-get update && \
apt-get install -y git bzip2 nodejs && \
apt-get clean && \
rm -rf /var/tmp /tmp /var/lib/apt/lists/*
RUN curl -sSL -o installer.sh https://repo.continuum.io/archive/Anaconda3-4.2.0-Linux-x86_64.sh && \
bash /installer.sh -b -f && \
rm /installer.sh
RUN npm install -g configurable-http-proxy && \
pip install --no-cache-dir \
notebook \
jupyterhub-kubespawner==0.9.* \
git+https://github.com/jupyterhub/jupyterhub.git@dcdb8d8a89d98cda411f00ac92b99f008ffaefd6 \
git+https://github.com/occ-data/jhub_remote_user_authenticator.git@53d22afbc5f75441169974fd98580d967600d700 \
pycurl==7.43.0.3
ADD /home/ubuntu/training_output/model.ckpt-112000.data-00000-of-00001 ~/model/112000.model
ADD /home/ubuntu/training_output/model.ckpt-112000.index ~/model/112000.index
ADD /home/ubuntu/training_output/model.ckpt-112000.meta ~/model/112000.meta
ADD cull_idle_servers.py /usr/local/bin/cull_idle_servers.py
ENTRYPOINT jupyterhub
我要构建的图像是从带有devel-gpu-py3标签的tensorflow图像构建的
答案 0 :(得分:2)
根据该错误,您缺少本机依赖项libssl-dev的安装。您可以通过修改以下行来安装它:
apt-get install -y git bzip2 nodejs && \
与
apt-get install -y git bzip2 nodejs libssl-dev && \