Невозможно установить sasl с помощью pip из-за ошибок gcc - PullRequest
0 голосов
/ 07 июня 2019

Я хочу установить определенную библиотеку, которая включает в себя несколько модулей в требованиях. Два из них sasl и sasl-thrift. Я сталкиваюсь с ошибками, так как при их установке setup.py не удается.

Я попытался пройти через ошибку и понял, что gcc не установлен в Docker-контейнере, поэтому я установил его. Даже после этого я получаю ту же ошибку и не могу ее понять. Я также читал похожие вопросы, в которых я нашел использование PyPy, но я не мог связать или сделать какие-либо дальнейшие шаги из них.

Моя команда для установки библиотеки:

python3 -m pip install git+https://github.com/my_org/my_lib.git@jupyter-notebooks-v1#egg=athena

Файл требований:

# If your are using it with airflow.
apache-airflow[celery,postgres,hive,password,crypto]==1.10.3
#  This file contain all the requirements to run dag and athena
tzlocal==1.5.1
urllib3==1.21.1
oauthlib==3.0.0
requests==2.18.4
coloredlogs==5.2
pymongo==3.6.1
fs==0.5.4
minio==4.0.6
sasl==0.2.1
thrift-sasl==0.3.0
boto3==1.9.115
botocore==1.12.115
mongoengine==0.17.0
haikunator==2.1.0
pycryptodome==3.7.3
pandas==0.24.2
pyarrow==0.12.1
CMRESHandler==1.0.0
elasticsearch==7.0.0

Ошибка при установке библиотеки:

Found existing installation: oauthlib 3.0.1
    Uninstalling oauthlib-3.0.1:
      Successfully uninstalled oauthlib-3.0.1
  Running setup.py install for fs ... done
  Running setup.py install for sasl ... error
    Complete output from command /opt/conda/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ffcj3sct/sasl/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-x2a76dk1-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.6
    creating build/lib.linux-x86_64-3.6/sasl
    copying sasl/__init__.py -> build/lib.linux-x86_64-3.6/sasl
    running egg_info
    writing sasl.egg-info/PKG-INFO
    writing dependency_links to sasl.egg-info/dependency_links.txt
    writing requirements to sasl.egg-info/requires.txt
    writing top-level names to sasl.egg-info/top_level.txt
    reading manifest file 'sasl.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'sasl.egg-info/SOURCES.txt'
    copying sasl/saslwrapper.cpp -> build/lib.linux-x86_64-3.6/sasl
    copying sasl/saslwrapper.h -> build/lib.linux-x86_64-3.6/sasl
    copying sasl/saslwrapper.pyx -> build/lib.linux-x86_64-3.6/sasl
    running build_ext
    building 'sasl.saslwrapper' extension
    creating build/temp.linux-x86_64-3.6
    creating build/temp.linux-x86_64-3.6/sasl
    gcc -pthread -B /opt/conda/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Isasl -I/opt/conda/include/python3.6m -c sasl/saslwrapper.cpp -o build/temp.linux-x86_64-3.6/sasl/saslwrapper.o
    gcc: error trying to exec 'cc1plus': execvp: No such file or directory
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/opt/conda/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ffcj3sct/sasl/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-x2a76dk1-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-ffcj3sct/sasl/
You are using pip version 9.0.3, however version 19.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Я ожидаю, что библиотека будет установлена ​​гладко.

1 Ответ

0 голосов
/ 07 июня 2019

Я нашел решение, установив sudo apt-get install libsasl2-dev.Эта библиотека имеет заголовок, и мне не нужно заботиться о gcc и g++ о себе.

...