gpt4 book ai didi

python - pip 安装不会向 pipFile 或 pipFile.lock 添加任何内容

转载 作者:行者123 更新时间:2023-12-02 22:47:41 26 4
gpt4 key购买 nike

当我尝试使用 pip install 终端将包安装到 Django 时,显示包已安装并且我可以看到进度,但 Pipfile 或 Pipfile.lock 中没有显示任何内容。

我遵循的步骤:

  1. pip install elasticsearch-dsl
  2. 安装在终端上的包(多次看到)
Requirement already satisfied: six in d:\development\pythonsetting\lib\site-packages (from elasticsearch-dsl) (1.12.0)
Requirement already satisfied: python-dateutil in d:\development\pythonsetting\lib\site-packages (from elasticsearch-dsl) (2.8.0)
Requirement already satisfied: elasticsearch<7.0.0,>=6.0.0 in d:\development\pythonsetting\lib\site-packages (from elasticsearch-dsl) (6.4.0)
Requirement already satisfied: urllib3>=1.21.1 in d:\development\pythonsetting\lib\site-packages (from elasticsearch<7.0.0,>=6.0.0->elasticsearch-dsl) (1.25.7)```
  1. 检查了我的 pipfile:
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
black = "*"
pylint = "*"

[packages]
django = "*"
djangorestframework = "*"
django-rest-knox = "*"


[requires]
python_version = "3.7"

[pipenv]
allow_prereleases = true

如何将这个包添加到我的 django 项目中?

最佳答案

我通过将命令从 pip install elasticsearch-dsl 更改为 pipenv install elasticsearch-dsl 解决了这个问题

成功了

关于python - pip 安装不会向 pipFile 或 pipFile.lock 添加任何内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59634375/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com