python - 即使似乎已安装 pipenv,也无法使用 pipenv 安装 Django
问题描述
我正在使用 Python 3.8.1:
$ python -V
Python 3.8.1
我已经安装了 pipenv:
$ pip list | grep pipenv
pipenv 2018.11.26
如果我尝试安装 Django,我会收到以下错误:
$ pipenv install django
pyenv: pipenv: command not found
The `pipenv' command exists in these Python versions:
3.7.2
我是否做错了什么导致 pipenv 无法与 3.8.1 一起使用,我该如何解决?
解决方案
我不是 pipenv 用户,但您的 pipenv 似乎已经在您的系统上安装了 python 3.7.2,而不是默认的 python 3.8.1。
这可能是因为您在 env 中的 pip 实际上适用于您系统上的 python 3.7.2。
一种可能的解决方案:
- 卸载使用 python 3.7.2 安装的 pipenv
pip uninstall pipenv
- 使用 python 3.8.1 安装 pipenv
python -m pip install pipenv
- 使用 pipenv 安装 Django
python -m pipenv install django
推荐阅读
- c++ - 广义 std::function (std::any 用于可调用对象)
- rest - NetSuite REST 服务 - 公司地址
- r - 安装包避风港的问题
- multithreading - 使用 Cyclic Barrier 确保 3 个线程将依次运行
- web-scraping - 如何从数千个经过身份验证的 url 中抓取相同的数据?
- php - 使用复选框删除php表数据中的多行
- azure-resource-manager - Azure ARM - DSC VM 配置
- python - 目标检测中基于锚点和无锚点
- oracle - 在 PL/SQL 中打印绑定变量时出错
- go - golang编译中的冲突类型