【问题标题】:How to install the pycrypto module for a definite python version如何为确定的 python 版本安装 pycrypto 模块
【发布时间】:2013-05-16 15:37:44
【问题描述】:

我正在尝试在 Ubuntu 13.04 x64 中安装“Userful MultiSeat-X64-5.0.1 ...”,在安装结束时遇到以下错误:

File "<string>", line 6, in <module>
ImportError: No module named Crypto.Cipher

此消息表示,没有 pycrypto 模块。

我应该如何安装它:

pip install pycrypto

但问题是 userful5 需要 python 2.6 才能工作,而 ubuntu 13.04 默认使用 python 2.7。我已经安装了python 2.6,但是我不知道如何为其安装pycrypto模块。

pip install pycrypto

返回:

Requirement already satisfied (use --upgrade to upgrade): pycrypto in /usr/lib/python2.7/dist-packages

据我了解,这个模块已经安装在 python 2.7 中 但是如何将它安装到 python 2.6?

【问题讨论】:

标签: python ubuntu pycrypto


【解决方案1】:

python2.6(或easy_install)应该使用pip

pip-2.6 install pycrypto

使用easy_install获取pip-2.6

easy_install-2.6 pip
pip-2.6 install pycrypto

【讨论】:

  • "easy_install-2.6 pip" 返回:“未找到命令 'easy_install-2.6',您的意思是:来自包 'python-setuptools' (main) easy_install-2.6 的命令 'easy_install-2.7':找不到命令”
  • 从这里 pypi.python.org/pypi/setuptools#downloads 下载了 python2.6 的 setuptools 并且成功了。
猜你喜欢
  • 1970-01-01
  • 2020-12-07
  • 1970-01-01
  • 2021-07-02
  • 2017-06-26
  • 2011-08-24
  • 1970-01-01
  • 1970-01-01
  • 2012-06-10
相关资源
最近更新 更多