Я попытался установить библиотеку Pyodbc, чтобы использовать ее в воздушном потоке через файл needs.txt, однако в пакете содержится ошибка в соответствии со следующим журналом.
Requirements.txt
pymssql == 2.1.4
slackclient> = 1.0.0, <2.0.0 </p>
oauth2client == 4.1.3
virtualenv> = 15.0.0, <16.6.2 </p>
google-cloud-storage> = 1.15.0, <1.16.2 </p>
pyodbc> = 3.0.0, <4.0.27 </p>
Воздушный поток - журнал:
webserver_1 | Collecting pyodbc<4.0.27,>=3.0.0 (from -r /requirements.txt (line 6))
webserver_1 | Downloading https://files.pythonhosted.org/packages/b4/41/f3eb5e56af207a8fcc02f1f84cc3fed9fcf315565e65f418ae815e399929/pyodbc-4.0.26.tar.gz (219kB)
postgres_1 | done
postgres_1 | server stopped
postgres_1 |
postgres_1 | PostgreSQL init process complete; ready for start up.
postgres_1 |
postgres_1 | LOG: database system was shut down at 2019-06-24 18:24:09 UTC
postgres_1 | LOG: MultiXact member wraparound protections are now enabled
postgres_1 | LOG: database system is ready to accept connections
postgres_1 | LOG: autovacuum launcher started
webserver_1 | Collecting websocket-client<0.55.0,>=0.35 (from slackclient<2.0.0,>=1.0.0->-r /requirements.txt (line 2))
webserver_1 | Downloading https://files.pythonhosted.org/packages/26/2d/f749a5c82f6192d77ed061a38e02001afcba55fe8477336d26a950ab17ce/websocket_client-0.54.0-py2.py3-none-any.whl (200kB)
webserver_1 | Requirement already satisfied: requests<3.0a0,>=2.11 in /usr/local/lib/python3.6/site-packages (from slackclient<2.0.0,>=1.0.0->-r /requirements.txt (line 2)) (2.22.0)
webserver_1 | Requirement already satisfied: six<2.0a0,>=1.10 in /usr/local/lib/python3.6/site-packages (from slackclient<2.0.0,>=1.0.0->-r /requirements.txt (line 2)) (1.12.0)
webserver_1 | Requirement already satisfied: rsa>=3.1.4 in /usr/local/lib/python3.6/site-packages (from oauth2client==4.1.3->-r /requirements.txt (line 3)) (4.0)
webserver_1 | Requirement already satisfied: pyasn1>=0.1.7 in /usr/local/lib/python3.6/site-packages (from oauth2client==4.1.3->-r /requirements.txt (line 3)) (0.4.5)
webserver_1 | Requirement already satisfied: httplib2>=0.9.1 in /usr/local/lib/python3.6/site-packages (from oauth2client==4.1.3->-r /requirements.txt (line 3)) (0.13.0)
webserver_1 | Requirement already satisfied: pyasn1-modules>=0.0.5 in /usr/local/lib/python3.6/site-packages (from oauth2client==4.1.3->-r /requirements.txt (line 3)) (0.2.5)
webserver_1 | Requirement already satisfied: google-auth>=1.2.0 in /usr/local/lib/python3.6/site-packages (from google-cloud-storage<1.16.2,>=1.15.0->-r /requirements.txt (line 5)) (1.6.3)
webserver_1 | Requirement already satisfied: google-resumable-media>=0.3.1 in /usr/local/lib/python3.6/site-packages (from google-cloud-storage<1.16.2,>=1.15.0->-r /requirements.txt (line 5)) (0.3.2)
webserver_1 | Requirement already satisfied: google-cloud-core<2.0dev,>=1.0.0 in /usr/local/lib/python3.6/site-packages (from google-cloud-storage<1.16.2,>=1.15.0->-r /requirements.txt (line 5)) (1.0.2)
webserver_1 | Requirement already satisfied: idna<2.9,>=2.5 in /usr/local/lib/python3.6/site-packages (from requests<3.0a0,>=2.11->slackclient<2.0.0,>=1.0.0->-r /requirements.txt (line 2)) (2.8)
webserver_1 | Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.6/site-packages (from requests<3.0a0,>=2.11->slackclient<2.0.0,>=1.0.0->-r /requirements.txt (line 2)) (1.25.3)
webserver_1 | Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/site-packages (from requests<3.0a0,>=2.11->slackclient<2.0.0,>=1.0.0->-r /requirements.txt (line 2)) (3.0.4)
webserver_1 | Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/site-packages (from requests<3.0a0,>=2.11->slackclient<2.0.0,>=1.0.0->-r /requirements.txt (line 2)) (2019.6.16)
webserver_1 | Requirement already satisfied: cachetools>=2.0.0 in /usr/local/lib/python3.6/site-packages (from google-auth>=1.2.0->google-cloud-storage<1.16.2,>=1.15.0->-r /requirements.txt (line 5)) (3.1.1)
webserver_1 | Requirement already satisfied: google-api-core<2.0.0dev,>=1.11.0 in /usr/local/lib/python3.6/site-packages (from google-cloud-core<2.0dev,>=1.0.0->google-cloud-storage<1.16.2,>=1.15.0->-r /requirements.txt (line 5)) (1.11.1)
webserver_1 | Requirement already satisfied: pytz in /usr/local/lib/python3.6/site-packages (from google-api-core<2.0.0dev,>=1.11.0->google-cloud-core<2.0dev,>=1.0.0->google-cloud-storage<1.16.2,>=1.15.0->-r /requirements.txt (line 5)) (2019.1)
webserver_1 | Requirement already satisfied: protobuf>=3.4.0 in /usr/local/lib/python3.6/site-packages (from google-api-core<2.0.0dev,>=1.11.0->google-cloud-core<2.0dev,>=1.0.0->google-cloud-storage<1.16.2,>=1.15.0->-r /requirements.txt (line 5)) (3.8.0)
webserver_1 | Requirement already satisfied: setuptools>=34.0.0 in /usr/local/lib/python3.6/site-packages (from google-api-core<2.0.0dev,>=1.11.0->google-cloud-core<2.0dev,>=1.0.0->google-cloud-storage<1.16.2,>=1.15.0->-r /requirements.txt (line 5)) (41.0.1)
webserver_1 | Requirement already satisfied: googleapis-common-protos!=1.5.4,<2.0dev,>=1.5.3 in /usr/local/lib/python3.6/site-packages (from google-api-core<2.0.0dev,>=1.11.0->google-cloud-core<2.0dev,>=1.0.0->google-cloud-storage<1.16.2,>=1.15.0->-r /requirements.txt (line 5)) (1.6.0)
webserver_1 | Building wheels for collected packages: slackclient, pyodbc
webserver_1 | Building wheel for slackclient (setup.py): started
webserver_1 | Building wheel for slackclient (setup.py): finished with status 'done'
webserver_1 | Stored in directory: /usr/local/airflow/.cache/pip/wheels/3b/d4/92/3458f0e1a3e1a9c8935d3b2db89a75d74d8d45601fedec752f
webserver_1 | Building wheel for pyodbc (setup.py): started
webserver_1 | Building wheel for pyodbc (setup.py): finished with status 'error'
webserver_1 | ERROR: Complete output from command /usr/local/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-ig641wmh/pyodbc/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 /tmp/pip-wheel-bv_vi38d --python-tag cp36:
webserver_1 | ERROR: running bdist_wheel
webserver_1 | running build
webserver_1 | running build_ext
webserver_1 | building 'pyodbc' extension
webserver_1 | creating build
webserver_1 | creating build/temp.linux-x86_64-3.6
webserver_1 | creating build/temp.linux-x86_64-3.6/src
webserver_1 | gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPYODBC_VERSION=4.0.26 -I/usr/local/include/python3.6m -c src/buffer.cpp -o build/temp.linux-x86_64-3.6/src/buffer.o -Wno-write-strings
webserver_1 | In file included from src/buffer.cpp:12:0:
webserver_1 | src/pyodbc.h:56:17: fatal error: sql.h: No such file or directory
webserver_1 | #include <sql.h>
webserver_1 | ^
webserver_1 | compilation terminated.
webserver_1 | error: command 'gcc' failed with exit status 1