Python 构建docker映像时出错:未能为pycurl(setup.py)构建控制盘

Python 构建docker映像时出错:未能为pycurl(setup.py)构建控制盘,python,docker,pycurl,Python,Docker,Pycurl,我试图从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

我试图从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
这个错误

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

我从中生成的映像是从带有devel-gpu-py3标记的tensorflow映像生成的。根据错误,您缺少本机依赖项libssl-dev的安装。您可以通过修改此行来安装它:

  apt-get install -y git bzip2 nodejs && \


根据错误,您缺少本机依赖项libssl-dev的安装。您可以通过修改此行来安装它:

  apt-get install -y git bzip2 nodejs && \