ERROR: Could not build wheels for bcrypt which use PEP 517 and cannot be installed directly(错误:无法为使用 PEP 517 且无法直接安装的 bcrypt 构建轮子)
问题描述
pycharm 中的解释器配置由于某种原因变得无效,所以我为我正在处理的项目创建了一个新的虚拟环境,并再次安装了依赖项.但是我在再次安装 bcrypt 时遇到了麻烦.这是完整的错误.该项目在以前的解释器上运行良好,所以我怀疑 python 版本与它有什么关系.我尝试安装轮子以及错误说 could not buildwheels
但这也没有完成这项工作.
The interpreter configuration in pycharm became invalid for some reason so I created a new virtual environment for the project that I was working on, and installed the dependencies again. But I am having trouble in installing bcrypt again. Here's the complete error. The project was working fine with the previous interpreter so I doubt that the python version has anything to do with it. I tried installing wheel as well as the error said could not build wheels
but that didn't do the job as well.
完整的错误:
Collecting flask-bcrypt
Using cached https://files.pythonhosted.org/packages/1d/c0/6d4c04d007d72b355de24e7a223978d1a95732245f
9e9becbf45d3024bf8/Flask-Bcrypt-0.7.1.tar.gz
Requirement already satisfied: Flask in c:usersUserappdatalocalprogramspythonpython38-3
2libsite-packages (from flask-bcrypt) (1.1.2)
Collecting bcrypt (from flask-bcrypt)
Using cached https://files.pythonhosted.org/packages/d8/ba/21c475ead997ee21502d30f76fd93ad8d5858d19a3
fad7cd153de698c4dd/bcrypt-3.2.0.tar.gz
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Requirement already satisfied: Jinja2>=2.10.1 in c:usersUserappdatalocalprogramspythonp
ython38-32libsite-packages (from Flask->flask-bcrypt) (2.11.2)
Requirement already satisfied: Werkzeug>=0.15 in c:usersUserappdatalocalprogramspythonp
ython38-32libsite-packages (from Flask->flask-bcrypt) (1.0.1)
Requirement already satisfied: itsdangerous>=0.24 in c:usersUserappdatalocalprogramspyth
onpython38-32libsite-packages (from Flask->flask-bcrypt) (1.1.0)
Requirement already satisfied: click>=5.1 in c:usersUserappdatalocalprogramspythonpytho
n38-32libsite-packages (from Flask->flask-bcrypt) (7.1.2)
Requirement already satisfied: six>=1.4.1 in c:usersUserappdata
oamingpythonpython38sit
e-packages (from bcrypt->flask-bcrypt) (1.15.0)
Requirement already satisfied: cffi>=1.1 in c:usersUserappdatalocalprogramspythonpython
38-32libsite-packages (from bcrypt->flask-bcrypt) (1.14.2)
Requirement already satisfied: MarkupSafe>=0.23 in c:usersUserappdatalocalprogramspython
python38-32libsite-packages (from Jinja2>=2.10.1->Flask->flask-bcrypt) (1.1.1)
Requirement already satisfied: pycparser in c:usersUserappdatalocalprogramspythonpython
38-32libsite-packages (from cffi>=1.1->bcrypt->flask-bcrypt) (2.20)
Building wheels for collected packages: bcrypt
Building wheel for bcrypt (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: 'c:usersUserappdatalocalprogramspythonpython38-32python.exe' 'c:usersUserappdatalocalprogramspythonpython38-32libsite-packagespip\_vendorpep517\_in_process.p
y' build_wheel 'C:conda_temp mpgl0zt2ul'
cwd: C:conda_temppip-install-9i9ne9ybcrypt
Complete output (15 lines):
running bdist_wheel
running build
running build_py
creating build
creating buildlib.win32-3.8
creating buildlib.win32-3.8crypt
copying srccrypt\__about__.py -> buildlib.win32-3.8crypt
copying srccrypt\__init__.py -> buildlib.win32-3.8crypt
copying srccryptpy.typed -> buildlib.win32-3.8crypt
running build_ext
generating cffi module 'build\temp.win32-3.8\Release\_bcrypt.c'
creating build emp.win32-3.8
creating build emp.win32-3.8Release
building '_bcrypt' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://vi
sualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Failed building wheel for bcrypt
Running setup.py clean for bcrypt
Failed to build bcrypt
ERROR: Could not build wheels for bcrypt which use PEP 517 and cannot be installed directly
WARNING: You are using pip version 19.2.3, however version 20.2.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
推荐答案
尝试使用这些命令:
python -m pip install --upgrade pip
python -m pip install --no-use-pep517 bcrypt
这篇关于错误:无法为使用 PEP 517 且无法直接安装的 bcrypt 构建轮子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!