[英]ERROR: Failed building wheel for pycryptodome
I was trying to install pycryptodome
, python-jose-cryptodome
using pip
within anaocnda3 environment.我试图在anaocnda3环境中使用
pip
安装pycryptodome
、 python-jose-cryptodome
。
I got this error:我收到此错误:
ERROR: Failed building wheel for pycryptodome
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?我已经尝试了许多版本的许多解决方案(最新版本,指定版本,使用 python 3.8 或 3.7,使用没有缓存的需求文本,甚至单独安装),但对我来说没有任何效果:(。任何解决方案?
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
并且很好,但同时使用pip
和conda
时可能会出现问题,这在 conda docs 中有明确提到。
One of the best practices when installing packages in an anaconda environment is to use conda
for search and install before using pip.在 anaconda 环境中安装软件包的最佳实践之一是在使用 pip 之前使用
conda
进行搜索和安装。
So instead of directly using pip
, try to :因此,不要直接使用
pip
,而是尝试:
Search for pycryptodome in anaconda packages repo在 anaconda 包 repo 中搜索pycryptodome
conda search pycryptodome
pycryptodome is available in anaconda repo . pycryptodome 在 anaconda repo 中可用。
The next step is to install pycryptodome :下一步是安装 pycryptodome :
conda install -c anaconda pycryptodome
or if you want to use conda-foge channel :或者如果您想使用 conda-foge 频道:
conda install -c conda-forge pycryptodome
this should get pycryptodome installed into your env这应该将 pycryptodome 安装到您的环境中
To use a requirements.txt file with conda :使用带有 conda 的 requirements.txt 文件:
conda install --yes --file requirements.txt
Summary : Best Practices Checklist When Using Pip in a Conda Environment摘要:在 Conda 环境中使用 Pip 时的最佳实践清单
Use pip only after conda仅在 conda 之后使用 pip
install as many requirements as possible with conda, then use pip使用 conda 安装尽可能多的需求,然后使用 pip
pip should be run with –upgrade-strategy only-if-needed (the default) pip 应该使用 –upgrade-strategy only-if-needed 运行(默认)
Do not use pip with the –user argument, avoid all “users” installs不要将 pip 与 –user 参数一起使用,避免所有“用户”安装
Use conda environments for isolation使用 conda 环境进行隔离
Recreate the environment if changes are needed如果需要更改,请重新创建环境
Store conda and pip requirements in text files将 conda 和 pip 要求存储在文本文件中
you can read more about this topic here on anaconda website , and on conda docs您可以在 anaconda 网站和conda docs上阅读有关此主题的更多信息
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.