Pycharm警告使用Pipenv安装软件包时未满足软件包要求 [英] Pycharm warns package requirement not satisfied when using pipenv to install package
问题描述
我正在尝试使用pipenv将软件包安装到我的Pycharm环境中。但是,当我使用 pipenv install< package name>
时,顶部会出现一个弹出窗口
I am trying to install packages into my Pycharm environment using pipenv. However, when I use pipenv install <package name>
, a popup appears on the top mentioning
未满足打包要求
"Package requirement not satisfied"
,并要求我从Pipfile.lock安装要求
and asks me to "install requirements from Pipfile.lock"
启动项目时,我选择Pipenv作为项目解释器。为什么PyCharm要求从头开始明确使用pipenv并从Pipfile.lock文件中重新安装软件包,为什么?将项目设置为使用Pipenv作为解释器。我是否要双重安装?
When I started the project, I selected Pipenv as my project interpreter.Why is PyCharm asking to re-install a package from the Pipfile.lock file when I clearly used pipenv from the beginning and set the project to use Pipenv as an interpreter. Am I double installing ?
更新:
它是现在报告为PyCharm中的错误,请对该问题进行投票:
It is now reported as a bug in PyCharm, please vote for the issue:
https://youtrack.jetbrains.com/issue/PY-34622
推荐答案
解决方案位于关于JetBrains的答案支持论坛。
步骤如下:
- 转到文件>在验证缓存/重新启动... ,然后按无效并重新启动。
- 重新启动后,重新添加解释器,等待重建存根,然后检查是否已解决问题。
- ,然后首先通过转到文件>设置>项目:>项目解释器,并将项目解释器设置为无解释器,来删除pipenv解释器作为项目解释器。单击应用,然后单击确定。然后重复步骤1和2,看看它是否可以解决问题。
- Go to File > Invalidate Caches/Restart... and press Invalidate and Restart.
- Once restarted, add the interpreter back, wait for the stubs to be rebuilt and then check to if the problem has been resolved.
- If not, then first remove the pipenv interpreter as the project interpreter by going to File > Settings > Project: > Project Interpreter and setting the project interpreter to No Interpreter. Click Apply and OK. Then repeat steps 1 and 2 and see if it solves the problem.
我不确定为什么会出现此问题,但似乎
I'm not sure why this problem occurs, but it seems to solve it when it comes up.
编辑07/29/19:
这篇关于Pycharm警告使用Pipenv安装软件包时未满足软件包要求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!