错误:pycryptodome的建筑轮子失败 [英] ERROR: Failed building wheel for pycryptodome

查看:413
本文介绍了错误:pycryptodome的建筑轮子失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在 anaocnda3 环境中使用pip安装pycryptodomepython-jose-cryptodome.

I was trying to install pycryptodome, python-jose-cryptodome using pip within anaocnda3 environment.

我收到此错误:

  ERROR: Failed building wheel for pycryptodome

我尝试了许多版本的许多解决方案(最新版本,指定版本,使用python 3.8或3.7,使用没有缓存甚至没有单独安装的要求文本),但对我没有任何帮助:(.任何解决方案?

I have tried many versions many solutions(latest versions, specified version, with python 3.8 or 3.7, using requirements text without cache and even alone installation) but nothing worked for me :(. Any solution?

推荐答案

虽然在anaconda环境中使用pip 是允许的,但是,在使用pipconda时可能会出现问题在一起,这在conda 文档.

While using pip in an anaconda environment is allowed and fine, issues may arise when using pip and conda together, this was clearly mentioned in the conda docs.

在anaconda环境中安装软件包的最佳实践之一是在使用pip之前使用conda进行搜索和安装.

One of the best practices when installing packages in an anaconda environment is to use conda for search and install before using pip.

所以,而不是直接使用pip,请尝试:

So instead of directly using pip, try to :

  1. 搜索,以检查anaconda软件包回购中的pycryptodome

  1. Search for pycryptodome in anaconda packages repo

conda search pycryptodome

pycryptodome在anaconda存储库中可用.

pycryptodome is available in anaconda repo .

下一步是安装pycryptodome:

The next step is to install pycryptodome :

conda install -c anaconda pycryptodome

或者如果您想使用conda-foge频道:

or if you want to use conda-foge channel :

conda install -c conda-forge pycryptodome

这应该将pycryptodome安装到您的环境中

this should get pycryptodome installed into your env

要在conda中使用requirements.txt文件:

To use a requirements.txt file with conda :

conda install --yes --file requirements.txt

摘要:在Conda环境中使用Pip时的最佳做法清单

仅在conda之后使用点子

  • 使用conda尽可能多地安装需求,然后使用pip

  • install as many requirements as possible with conda, then use pip

pip应该仅在需要时使用–upgrade-strategy(默认)

pip should be run with –upgrade-strategy only-if-needed (the default)

请勿在–user参数中使用pip,避免安装所有用户"

Do not use pip with the –user argument, avoid all "users" installs

使用conda环境进行隔离

  • 创建一个conda环境以隔离点子所做的任何更改
  • 由于硬链接,环境占用的空间很小
  • 应注意避免在根"环境中运行pip

如果需要更改,请重新创建环境

  • 一旦使用了点子,conda将不会知道更改
  • 要安装其他conda软件包,最好重新创建 环境
  • once pip has been used conda will be unaware of the changes
  • to install additional conda packages it is best to recreate the environment

将conda和pip要求存储在文本文件中

    可以通过–file参数将
  • 包装要求传递给conda
  • pip接受带有-r或–requirements的Python软件包列表
  • conda env将基于以下文件导出或创建环境: conda和pip要求.
  • package requirements can be passed to conda via the –file argument
  • pip accepts a list of Python packages with -r or –requirements
  • conda env will export or create environments based on a file with conda and pip requirements .

您可以在在Anaconda网站上阅读更多有关此主题的信息,并在 查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆