AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 647143
Accepted
empedokles
empedokles
Asked: 2015-07-12 02:57:37 +0800 CST2015-07-12 02:57:37 +0800 CST 2015-07-12 02:57:37 +0800 CST

在 Ubuntu 上将 scrypt-0.7.1 安装到虚拟环境中时出现问题

  • 772

我正在尝试将 python 包scrypt安装到我在 Ubuntu 下的虚拟 python 环境中。我不太明白错误信息。我必须做什么才能让它发挥作用?

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
14.10
  • 1 1 个回答
  • 871 Views

1 个回答

  • Voted
  1. Best Answer
    A.B.
    2015-07-12T04:00:38+08:002015-07-12T04:00:38+08:00

    两条错误消息,两个答案:

    1. 只需运行以下命令即可安装 ssl 开发库

      sudo apt-get install libssl-dev
      

      为什么?

      从错误消息:

      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>
      

      在哪里openssl/aes.h?

      % apt-file search openssl/aes.h
      libssl-dev: /usr/include/openssl/aes.h
      
    2. 和其他错误信息

      /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
      

      使用这个命令

      conda install cryptography
      pip install 'requests[security]'
      

      或使用 Python > 2.7.9

    • 1

相关问题

  • 阻止“x”的 Viber 图标 [重复]

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve