python - 我无法在我的虚拟环境中安装 Django
问题描述
我想在我的虚拟环境中安装 Django(它完全可以工作),但是遇到了很多错误。有谁知道该怎么做?
我刚刚在 PowerShell 中输入了这个:
pipenv install django
得到了这个:
Error: An error occurred while installing django!
Error text: Collecting django
Using cached Django-3.1.7-py3-none-any.whl (7.8 MB)
ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM Pipfile.lock!. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
django from https://files.pythonhosted.org/packages/b8/6f/9a4415cc4fe9228e26ea53cf2005961799b2abb8da0411e519fdb74754fa/Django-3.1.7-py3-none-any.whl#sha256=baf099db36ad31f970775d0be5587cc58a6256a6771a44eb795b554d45f211b8 (from -r c:\users\vojtěch\appdata\local\temp\pipenv-e9otm_0m-requirements\pipenv-sj4h6g3_-requirement.txt (line 1)):
Expected sha256 baf099db36ad31f970775d0be5587cc58a6256a6771a44eb795b554d45f211b8
Got 764ad5e659cd3a7740b314806b39c67501c6136a21d23652515df3bfb4023d76
解决方案
看起来您的原始下载可能已失败,并且 pip 正在使用缓存下载而不是获取新下载。再试pipenv lock --clear
一次pipenv install django
。
推荐阅读
- github - 使用 Actions 时,如何获取 Yocto 构建以访问私有 GitHub 存储库?
- html - 控制表格的滚动
- unit-testing - 如何对普罗米修斯 GaugeVec 进行单元测试
- python-3.x - Python 脚本与系统一起执行,然后 serial.write() 通过串行发送数据并崩溃 - Raspberry Pi 和 Arduino
- express - 在 post express js 上,req 正文始终为空
- laravel - Laravel 共享主机 htaccess 尾部斜杠重定向问题
- python - QtCore.Signal 和 SIGNAL 有什么区别?
- tensorflow - 张量流中渐变胶带的问题
- java - 字符串类型的方法 repeat (int) 未定义
- makefile - Makefile 单独的头文件依赖