Problemas ao instalar o scrypt-0.7.1 no Ubuntu em um ambiente virtual

0

Estou tentando instalar o pacote python scrypt em meu ambiente python virutal no Ubuntu. Eu não entendo muito bem a mensagem de erro. O que eu tenho que fazer para que isso funcione?

nuc@nuc:~/Dropbox/julie$ source julie/bin/activate
(julie)nuc@nuc:~/Dropbox/Julie$ pip install scrypt
Collecting scrypt
/home/nuc/Dropbox/Julie/julie/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading scrypt-0.7.1.tar.gz
Installing collected packages: scrypt
  Running setup.py install for scrypt
    Complete output from command /home/nuc/Dropbox/Julie/julie/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-utQ19_/scrypt/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-0_M4Md-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/nuc/Dropbox/Julie/julie/include/site/python2.7/scrypt:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-2.7
    copying scrypt.py -> build/lib.linux-x86_64-2.7
    running build_ext
    building '_scrypt' extension
    creating build/temp.linux-x86_64-2.7
    creating build/temp.linux-x86_64-2.7/src
    creating build/temp.linux-x86_64-2.7/scrypt-1.1.6
    creating build/temp.linux-x86_64-2.7/scrypt-1.1.6/lib
    creating build/temp.linux-x86_64-2.7/scrypt-1.1.6/lib/crypto
    creating build/temp.linux-x86_64-2.7/scrypt-1.1.6/lib/scryptenc
    creating build/temp.linux-x86_64-2.7/scrypt-1.1.6/lib/util
    gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DHAVE_CONFIG_H -DHAVE_CLOCK_GETTIME=1 -DHAVE_LIBRT=1 -DHAVE_POSIX_MEMALIGN=1 -DHAVE_STRUCT_SYSINFO=1 -DHAVE_STRUCT_SYSINFO_MEM_UNIT=1 -DHAVE_STRUCT_SYSINFO_TOTALRAM=1 -DHAVE_SYSINFO=1 -DHAVE_SYS_SYSINFO_H=1 -D_FILE_OFFSET_BITS=64 -Iscrypt-1.1.6 -Iscrypt-1.1.6/lib -Iscrypt-1.1.6/lib/scryptenc -Iscrypt-1.1.6/lib/crypto -Iscrypt-1.1.6/lib/util -I/home/nuc/anaconda/include/python2.7 -c src/scrypt.c -o build/temp.linux-x86_64-2.7/src/scrypt.o -O2
    gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DHAVE_CONFIG_H -DHAVE_CLOCK_GETTIME=1 -DHAVE_LIBRT=1 -DHAVE_POSIX_MEMALIGN=1 -DHAVE_STRUCT_SYSINFO=1 -DHAVE_STRUCT_SYSINFO_MEM_UNIT=1 -DHAVE_STRUCT_SYSINFO_TOTALRAM=1 -DHAVE_SYSINFO=1 -DHAVE_SYS_SYSINFO_H=1 -D_FILE_OFFSET_BITS=64 -Iscrypt-1.1.6 -Iscrypt-1.1.6/lib -Iscrypt-1.1.6/lib/scryptenc -Iscrypt-1.1.6/lib/crypto -Iscrypt-1.1.6/lib/util -I/home/nuc/anaconda/include/python2.7 -c scrypt-1.1.6/lib/crypto/crypto_aesctr.c -o build/temp.linux-x86_64-2.7/scrypt-1.1.6/lib/crypto/crypto_aesctr.o -O2
    scrypt-1.1.6/lib/crypto/crypto_aesctr.c:38:25: fatal error: openssl/aes.h: Datei oder Verzeichnis nicht gefunden
     #include <openssl/aes.h>
                         ^
compilation terminated.
error: command 'gcc' failed with exit status 1

----------------------------------------
Command "/home/nuc/Dropbox/Julie/julie/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-utQ19_/scrypt/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-0_M4Md-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/nuc/Dropbox/julie/julie/include/site/python2.7/scrypt" failed with error code 1 in /tmp/pip-build-utQ19_/scrypt
    
por empedokles 11.07.2015 / 12:57

1 resposta

1

Duas mensagens de erro, duas respostas:

  1. Basta executar o comando abaixo para instalar as bibliotecas de desenvolvimento ssl

    sudo apt-get install libssl-dev
    

    Por quê?

    Da mensagem de erro:

    scrypt-1.1.6/lib/crypto/crypto_aesctr.c:38:25: fatal error: openssl/aes.h: Datei oder Verzeichnis nicht gefunden
    #include <openssl/aes.h>
    

    Onde está openssl/aes.h ?

    % apt-file search openssl/aes.h
    libssl-dev: /usr/include/openssl/aes.h
    
  2. E a outra mensagem de erro

    /home/nuc/Dropbox/Julie/julie/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
      InsecurePlatformWarning
    

    Use esses comandos

    conda install cryptography
    pip install 'requests[security]'
    

    ou use o Python > 2.7.9

por A.B. 11.07.2015 / 14:00