jinjia2安装失败?求助

jinjia2安装失败?求助

Microsoft Windows [版本 10.0.18362.418]
(c) 2019 Microsoft Corporation。保留所有权利。

(test_env) C:\Users\C\PycharmProjects\djago_test>pip install jinjia2
Collecting jinjia2
  ERROR: Could not find a version that satisfies the requirement jinjia2 (from versions: none)
ERROR: No matching distribution found for jinjia2

(test_env) C:\Users\C\PycharmProjects\djago_test>python -m pip install --upgrade pip
Requirement already up-to-date: pip in c:\users\c\desktop\env\test_env\lib\site-packages (19.2.3)

(test_env) C:\Users\C\PycharmProjects\djago_test>pip install jinjia2
Collecting jinjia2
  ERROR: Could not find a version that satisfies the requirement jinjia2 (from versions: none)
ERROR: No matching distribution found for jinjia2



正在回答 回答被采纳积分+1

登陆购买课程后可参与讨论,去登陆

2回答
好帮手慕美 2019-10-14 11:04:50

同学,你好。同学也可以使用源码安装的形式进行安装。

1、下载whl的文件进行安装,下载地址:https://pypi.org/project/Jinja2/#files

http://img1.sycdn.imooc.com//climg/5da3e5620951de9d08090165.jpg

2、进到文件所在的路径中,使用pip install xxxx.whl进行安装即可

http://img1.sycdn.imooc.com//climg/5da3e59f09e3607309700129.jpg

如果我的回答解决了您的疑惑,请采纳!祝学习愉快~~~~

提问者 qq_小白de_0 2019-10-13 17:52:15

作为一个 Python egg (通过 easy_install)

你可以用 easy_install 或 pip 安装最新的版本的 Jinja2:

sudo easy_install Jinja2
sudo pip install Jinja2

后来我用了第一个方式

(test_env) C:\Users\C\PycharmProjects\djago_test>easy_install Jinja2
Searching for Jinja2
Reading https://pypi.org/simple/Jinja2/
Downloading https://files.pythonhosted.org/packages/65/e0/eb35e762802015cab1ccee04e8a277b03f1d8e53da3ec3106882ec42558b/Jinja2-2.10.3-py2.py3-none-any.whl#sha256=74
320bb91f31270f9551d46522e33af46a80c3d619f4a4bf42b3164d30b5911f
Best match: Jinja2 2.10.3
Processing Jinja2-2.10.3-py2.py3-none-any.whl
Installing Jinja2-2.10.3-py2.py3-none-any.whl to c:\users\c\desktop\env\test_env\lib\site-packages
writing requirements to c:\users\c\desktop\env\test_env\lib\site-packages\Jinja2-2.10.3-py3.7.egg\EGG-INFO\requires.txt
Adding Jinja2 2.10.3 to easy-install.pth file

Installed c:\users\c\desktop\env\test_env\lib\site-packages\jinja2-2.10.3-py3.7.egg
Processing dependencies for Jinja2
Searching for MarkupSafe>=0.23
Reading https://pypi.org/simple/MarkupSafe/
Downloading https://files.pythonhosted.org/packages/5b/d4/1deb3c5dc3714fb160c7e2116fc6dff36a063d9156a9328cce54ef35cc52/MarkupSafe-1.1.1-cp37-cp37m-win32.whl#sha256
=b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2
Best match: MarkupSafe 1.1.1
Processing MarkupSafe-1.1.1-cp37-cp37m-win32.whl
Installing MarkupSafe-1.1.1-cp37-cp37m-win32.whl to c:\users\c\desktop\env\test_env\lib\site-packages
Adding MarkupSafe 1.1.1 to easy-install.pth file

Installed c:\users\c\desktop\env\test_env\lib\site-packages\markupsafe-1.1.1-py3.7-win32.egg
Finished processing dependencies for Jinja2

问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
3.从网页搭建入门Python Web
  • 参与学习           人
  • 提交作业       218    份
  • 解答问题       3562    个

本阶段带你用Python开发一个网站,学习主流框架Django+Flask是Python Web开发的第一步,在基础知识上实现积分商城的项目开发,体验真实的项目开发流程,提高解决编程问题和效率的能力。

了解课程
请稍等 ...
意见反馈 帮助中心 APP下载
官方微信

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师